No announcement yet.

git rebase without merge conflicts

  • Filter
  • Time
  • Show
Clear All
new posts

  • git rebase without merge conflicts

    I have a private branch I've been using to make updates. I had rebased my private branch and merged the changes to master some time ago and I need to do that again. However I'm getting a lot of merge conflicts. I am the only one who works on this particular branch, and it's a separate folder/tree in master that no one else works on. Is there an easy way to do something along the lines of:

    Rebase this branch and assume that the contents of the branch should be "merged" as-is?



  • #2
    You should rebase your private branch to the top of master. At that point the merge conflicts should disappear (or you'll need to resolve them) and you should be able to once again merge in your private branch cleanly.

    Honestly though, branches in Git are inexpensive - just create a new branch every time you start new work.


    • #3
      In the future I'll try using more branches, but wouldn't the rebase (which I assume goes to the top of master, is that not the case?) still want to "merge" the modified files and give me a bunch of merge conflicts (potentially).


      • #4
        Yes, it probably will. So you might want to cherry-pick your current changes into a new branch created off the top of master. Cheers.