-3

my code was working fine until I made a git push to a branch.

Now I see, <<<<<<< Updated upstream and >>>>>>> Stashed changes everywhere in my local and branch repo. How do I bring it back or remove those above mentioned

Sai Krishnadas
  • 2,863
  • 9
  • 36
  • 69
  • 3
    Is there a chance you also pulled changes from the remote? – tomerpacific Apr 27 '22 at 10:08
  • 1
    Don't say "made a git push to a branch" That's meaningless. Show exactly what you did: give a transcript of what you said to Git and what Git said in reply. – matt Apr 27 '22 at 10:56
  • Does this answer your question? [Git conflict markers](https://stackoverflow.com/questions/7901864/git-conflict-markers) – Marek R Apr 27 '22 at 11:09
  • Given the `>>>>>>> Stashed changes` message, you ran `git stash push` followed by `git stash apply` or equivalent. The `git push` command does not do this, but `git pull` *can* do this if you have configured autostash for rebase and are using rebase as your second step for your pull. – torek Apr 27 '22 at 17:42

1 Answers1

3

This is probably a merge conflict so you made changes and someone else made changes to the remote branch as well you pulled and then there were conflicts

The only way to fix it and keep the written code is to remove these merge conflicts.

Bascially you have to check every file with such merge conflicts and fix the "errors" by hand.

>>>>>>>>>>>>> these just highlight one of the conflicts <<<<<<<<<<<<<< these are the end of the conflict of one branch.

DharmanBot
  • 1,066
  • 2
  • 6
  • 10
h0p3zZ
  • 690
  • 3
  • 16