0

I'm new to git and have updated my branch from master by:

git checkout master
git pull
git checkout my-feature
git merge master

I had a merge conflict and fixed the file manually.

My question is what now? How do I commit my fixes (if that is the correct term here) and ensure my branch is up-to-date so that I can push to Github and continue working? My branch is in its merging state (my-branch|MERGING), can I git add and commit in this state?

MeltingDog
  • 14,310
  • 43
  • 165
  • 295
  • If you run `git status`, it should tell you what's up and what commands you can run. – melpomene Jun 14 '18 at 03:29
  • @melpomene yes it shows a list of files that have been modified or are new (these are files I have not worked on but would have been updated in Master by other people) under 'Changes to be committed'. – MeltingDog Jun 14 '18 at 03:33
  • Possible duplicate of [How to resolve merge conflicts in Git?](https://stackoverflow.com/questions/161813/how-to-resolve-merge-conflicts-in-git) – matt Jun 14 '18 at 03:34
  • 1
    I'm talking about the output under #3 in https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/#competing-line-change-merge-conflicts: "*(use "git add ..." to mark resolution)*" and then "*(fix conflicts and run "git commit")*". – melpomene Jun 14 '18 at 03:38

1 Answers1

0

If:

  • git status does not show use "git add ..." to mark resolution
  • git diff does not show any merge marker left (as I illustrated here)

Then you can commit what is currently staged, and push. And keep working on your current modification.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250