I'm working with another developer and we seem to have got ourselves into a GIT pickle. I commit code regularly and regularly push to the remote master. My colleague (whilst a great guy and developer) has not got into the habit of doing this and when I went to Pull the Head revision this morning (as is my habit), I was faced with the following error message:
Cannot pull because there are uncommitted changes. Commit or undo your changes before pulling again. See the Output window for details.
I then noticed there were 5 incoming commits dating back to 5 days earlier. I have no local commits at all and no staged changes.
I've tried Sync'ing, pulling and everything else I could in the VS interface to no avail.
Has anyone else experienced this and can they help me resolve it please.
Thanks
Git in Visual Studio, VSTS, and TFS is standard Git. Although Sync isn't a Git command, some GUI environments provide a sync button to both update your local files and push your local changes to your remote (your hosted repository).
For more information on Sync, see Use git fetch, pull, push and sync for version control in Visual Studio. Open the Team Explorer and open the Sync view. Then select the Pull link under Incoming Commits to pull remote changes and merge them into your local branch.
git-sync is a simple command that pulls a git repository into a local directory. It is a perfect "sidecar" container in Kubernetes - it can periodically pull files down from a repository so that an application can consume them. git-sync can pull one time, or on a regular interval.
I had the same problem, because a number of package files were removed on the server which were not being used. I had to open command prompt and see all errors by running:
git pull
I saw this error with a list of files to remove:
Please move or remove them before you can merge.
Aborting.
After removing them I was able to successfully do a pull.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With