I used the following git commands:
git stash
git pull
After pull, the command line displayed:
Auto-merging ...path/ConflictFile.xxx
CONFLICT (content): Merge conflict in ...path/ConflictFile.xxx
Automatic merge failed; fix conflicts and then commit the result.
I chose "accept incoming changes" for the conflicts in file 1. Now I want out.
But in case it changes an answer to help me understand, running git status
now shows this:
Your branch and 'origin/develop' have diverged,
and have 1 and 5 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Then it says (note-these are co-worker's files so I don't understand this)
Changes to be committed:
/path/fileHeAdded.xxx
/path/fileHeAdded.xxx
/path/fileHeAdded.xxx
/path/fileHeUpdated.xxx
Then it says:
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: path/ConflictFile.xxx
Untracked files:
(use "git add <file>..." to include in what will be committed)
path/OneOfMyUntrackedFiles.xxx
path/AnotherOfMyUntrackedFiles.xxx
Those last ones ^ make sense because they are files I added yesterday but did not stage.
How do I undo both the stash and pull to get back to where I was before I ran them? I read you can run git merge --abort, but will that remove the stash or will I need to remove that separately?
I just want to get things clean before I learn about the conflicts.
Thanks!