I have a master and a branch A.
I'm trying to get changes to go from A to master.
However, there are merge conflicts.
Currently, when I use git merge or similar things (for example, IntelliJ's built-in merge conflict resolver or SourceTree + KDiff3), when there are conflicts, I can fix them.
However, the fixes I make are done on the master branch.
This means with a protected remote master (i.e. via GitHub) where you can't push directly to master, I can't actually commit the merge conflict fixes.
Is there a way to make edits committed to A and then merge them altogether into master?
I can get this behavior using GitHub's merge conflict editor - when you use it, it commits the changes into branch A and then you still have to do code review, etc. to commit into master. But I would like to be able to do the merge conflict resolution in my IDE, ideally.
Edit: further searching has suggested that I can actually merge master into A, resolving conflicts in the process, and then merge A back into master. Can anyone confirm if that sounds right?
git checkout A && git merge master(this mergesmasterintoA); 2) resolve conflicts; 3)git add <what needs to be committed> && git commit; 4)git checkout master && git merge A; Hope it helps