1

I have made changes to my project repository in several files. Then i commited and didn't pushed em. Later i've found a bug in code and opened git log to revert the last commit. Since i did it this commit has disappeared from log, and i cannot both push or pull repository due to an error.

I've tried making a new commit but this only changed the error message on pull/push:

An error was raised by libgit2. Category = 21 (MergeConflict). 5 uncommitted changes would be overwritten by merge

git status message:

On branch master

Your branch and 'origin/master' have diverged, and have 1 and 1 different commit each, respectively. (use "git pull" to merge the remote branch into yours)

Commited from VS 2013, using log from TortoiseGit. What happend and how do i push/pull and get back my bugged commit changes?

Croll
  • 3,631
  • 6
  • 30
  • 63

2 Answers2

1

Your branch and 'origin/master' have diverged, and have 1 and 1 different commit each, respectively.

To resolve that "divergence", you can do a:

git pull --rebase
git push

That will replay your commits on top of the most recent origin/master ones, and allows the push to proceed.

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

In tortoisegit, i had to use command Reset "master" to this on last commit. Found it in TortoiseGit > Revision Graph.

Croll
  • 3,631
  • 6
  • 30
  • 63