git: upstream / stash – deciphering a conflict message

Say you’ve done a git stash pop then, when you’re resolving a conflict in a git merge, you may get something that looks like this:

<<<<<<< Updated upstream

some code A

=======

some code B

>>>>>>> Stashed changes

There is no inherent upstream / downstream in git as it’s distributed. However, in terms of flow of data:

downstream means when you copy from a repo. i.e. your repo is at the bottom of a flow coming from upstream repos.

 

upstream means changes you want to send back to the repo.

i.e. code A is from changes you made in a branch (it could be the current branch) and code B is from changes you made and stashed.

See also:

http://stackoverflow.com/questions/2739376/definition-of-downstream-and-upstream

http://stackoverflow.com/questions/6818662/resolving-conflict-in-git

Leave a Reply

Your email address will not be published. Required fields are marked *