我试图解决冲突时弄乱了我的存储库。一切都很好(我已经熟悉了Git)但是当我试图将当前分支重置为之前的提交时,事情变得很糟糕(我不知道我到底在做什么,我承认)。在SourceTree中,我现在有2个提交从GitHub中提取,10个提交到推送。当我试图拉,我得到了这个:
git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
git -c diff.mnemonicprefix=false -c core.quotepath=false pull --no-commit origin master
From https://github.com/JnLlnd/CSVBuddy
* branch master -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
TEST-TheBeatles-Tab (1).txt
TEST-TheBeatles-Tab-EXPORT (1).txt
TEST-TheBeatles-Tab-EXPORT.txt
html-doc/img/review2_5_CSV Buddy_award.png
icon/csvbuddy-16x16.png
icon/csvbuddy-32x32.png
Please move or remove them before you can merge.
Aborting
我移动了6个文件并尝试再次拉动。它似乎工作(没有错误信息)。但是,我仍然有迹象表明有2个拉动。
如果我尝试推送10次提交,我会收到以下错误消息:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
Pushing to https://github.com/JnLlnd/CSVBuddy
To https://github.com/JnLlnd/CSVBuddy
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/JnLlnd/CSVBuddy'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
嗯......我想我对Git并不熟悉;-)我该怎么办?
答案 0 :(得分:0)
行。以为我明白了。在我可以根据需要进行拉/推之前,我还有2个冲突需要解决。
感谢阅读。