VS2015中使用Git遇到问题 Cannot do push / pull in git - working with visual studio
I have made a lot of changes, when I am trying to push them - I am getting the next error:
You cannot push branch master to remote origin because there are new commits in the remote repository’s branch. Pushing this branch would result in a non-fast-forward update on the branch in the remote repository.
When I am trying to pull the changes I get:
Cannot pull because there are uncommitted changes. Commit or undo your changes before pulling again. See the Output window for details.
I dont have any uncommitted changes...
I am stock from both ways and dont know how solve this issue.
Try this procedure to solve:
stash your local commits Try to get the changes and then push:
$ git stash
pull from master:
$ git pull
get your local changes back after pulling the master branch
$ git stash pop
commit your local changes
$ git commit
push
$ git push