我在家庭桌面上编辑文件并推送到 bitbucket.org 以及上传到我的测试网站。然后我从 bitbucket.org 拉到我的笔记本电脑上。它告诉我我需要合并文件,但我不知道如何将文件从测试网站复制到笔记本电脑本地目录并继续我的工作。我想我在合并过程中发挥了领导作用,并使用 gitg 进行了更改(不确定我是否确实提交了)。
当我尝试从笔记本电脑推送到 bitbucket.org 时,我的问题和无知变得更加明显:
kurt@tosh ~/Public/laddercms $ git status
On branch NumPermit
Your branch is ahead of 'origin/NumPermit' by 2 commits.
nothing to commit (working directory clean)
kurt@tosh ~/Public/laddercms $ git push -u origin NumPermit
Password
for 'https--kurtjensen@bitbucket.org': To
https--kurtjensen@bitbucket.org/kurtjensen/laddercms.git !
[rejected] NumPermit -> NumPermit (non-fast-forward) error:
failed to push some refs to 'https--kurtjensen@bitbucket.org/kurtjensen/laddercms.git'
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.
kurt@tosh ~/Public/laddercms $ git pull origin NumPermit
Password for
'https--kurtjensen@bitbucket.org': From
https--bitbucket.org/kurtjensen/laddercms * branch
NumPermit -> FETCH_HEAD Auto-merging profile/ajax/ProfileForm.php
CONFLICT (content): Merge conflict in profile/ajax/ProfileForm.php
Auto-merging Core/protect.php
CONFLICT (content): Merge conflict in Core/protect.php Auto-merging
Core/class.credentials.php
CONFLICT (content): Merge conflict in Core/class.credentials.php
Auto-merging Core/class.access.php
CONFLICT (content): Merge conflict in Core/class.access.php Automatic
merge failed; fix conflicts and then commit the result.
我的本地笔记本电脑文件是我想要保留的文件(我最相信它们是正确的。)
现在在 gitk 我看到:
作者:提交者:父:9d2cd77d4250bbf71e367021acf65e2c2465d0df(据我所知,即使使用 NLIKey,新的 Protect.php 也可以工作)子:0000000000000000000000000000000000000000(本地未提交的更改,未签入索引)分支:遵循:之前:
Local changes checked in to index but not committed
如何将(台式机、笔记本电脑、bitbucket)上的世界恢复到这个“提交/签入”点?
提前致谢...
引用:“混乱是我的专长。”