Last updated
Hi I was having some luck with GIT between 2 cloned locals (1 for ssis on one server, the other for powershell on another server) and 1 remote repo (Our Dept) with a test and master branch each having these paths 1) Powershell/Key Metrics and 2) SSIS/Key Metrics . There were about 8 files in my ssis vs project file when I last successfully committed and pushed a file after copying it to the local repo.
After adding my 4th ssis file I tried the same commit etc (copy changed file to local repo followed by git commit -a -m "something" in the team explorer command box under vs followed by choosing "commit all and push" from the vs drop down in team explorer) and got the error below . Eventually I just uploaded items to the remote repo thinking at least I'll know things are versioned. and wondering why I am even bothering with a local repo.
Bottom line, I'm stuck with this error which I'd like to understand and fix and avoid in the future. Its possible I left crucial details out of the explanation like how I deleted placeholders (there because git couldnt create empty folders) along the way and didn't consider till later that solution files etc change too.
Cant git tell you exactly whats bothering it so you can avoid costly file by file compares or whatever else is in store for me now, especially if you want to learn from your mistakes? I don't believe anybody else is adding items to the remote repo.
should I just clone everything all over after perhaps deleting both local repos? I see the hint (git pull) in the error message but honestly don't know from where that kind of command can be issued nor how the context for the target local repo would be set when issuing that command.
[I]Opening repositories:[/I]
[I]C:\Users\myuser\Source\Repos\Our Dept[/I]
[I]Commit e5f30bc1 created locally in repository C:\Users\myuser\Source\Repos\Our Dept[/I]
[I]Pushing Test[/I]
[I]Error: failed to push some refs to 'http://atfsserver:8080/xxx/yyyyyyyyyyyyyyyyy/develop/_git/Our%20Dept'[/I]
[I]Error: hint: Updates were rejected because the remote contains work that you do[/I]
[I]hint: not have locally. This is usually caused by another repository pushing[/I]
[I]hint: to the same ref. You may want to first integrate the remote changes[/I]
[I]hint: (e.g., 'git pull ...') before pushing again.[/I]
[I]hint: See the 'Note about fast-forwards' in 'git push --help' for details.[/I]
[I]Error encountered while pushing to the remote repository: rejected Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref. You may want to first integrate the remote changes before pushing again.[/I]