Visual Studio 2013 Github提交死锁 [英] Visual Studio 2013 Github commit deadlock
问题描述
我编辑了一些代码并提交了更改。我去pusj提交给github(我正在使用Vis.Studio 2013,它是内置的Git工具),但我得到了这个错误:
有新的
所以我试图拉远程更改,我得到这个错误:
发生错误详细信息:libgit2引发错误,Category = 21(MergeConflict)。
9个未提交的更改将被合并覆盖
我尝试更改分支,以便我可以推送我的更改,然后将它们与第一个分支合并,但出现此错误:
<
我不知道有什么变化,因为没有提交更改,所以在切换分支之前提交或撤消更改,请参阅输出窗口。该怎么办,除了可能将我的更改通过电子邮件发送给我的一位朋友并让他们推送我的更改。但我不知道我的本地提交会发生什么。
编辑
问题已解决。确保同步所有提交后,我打开git bash并拉出远程提交。经过几次尝试,我回到Visual Studio,发现它已经注册了合并。我解决了所有冲突的文件,并能够推送项目。
感谢所有回答!
听起来很愚蠢,我刚刚进入了命令行,它工作正常。
- Git状态
- Git pull
- Git push
一切正常。
如果我在Visual Studio中做了同样的事情,它不起作用。去搞清楚。
A few friends and I are working on a project via github. We are all sharing the same branch, which may or may not be a good idea.
I edited some of the code and committed the changes. I went to pusj commit to github (I am working with Vis. Studio 2013 and it's built-in Git tool), but I got this error:
"There are new remote changes. You must pull them before you can push."
So I tried to pull the remote changes and I get this error:
"An error occurred. Detailed message: An error was raised by libgit2. Category = 21 (MergeConflict). 9 uncommitted changes would be overwritten by merge"
I tried to change branches so that I might be able to push my changes and then merge them with the first branch, but I got this error:
"Cannot switch to master because there are uncommitted changes. Commit or undo your changes before you switch branches. See the Output window for details."
I have no idea what to do, except possibly to email my changes to one of my friends and have them push my changes. But I don't know what would happen with my local commits.
EDIT
The problem is resolved. After making sure to sync all the commits I opened git bash and pulled the remote commits. After a few attempts I went back to Visual Studio and discovered that it had registered the merge. I resolved all of the conflicted files and was able to push the project.
Thanks to everyone who answered!
As dumb as it sounds, I just went to the command line, and it worked.
- Git status
- Git pull
- Git push
all worked fine.
If I did that same thing within Visual Studio, it didn't work. Go figure.
这篇关于Visual Studio 2013 Github提交死锁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!