使用netbeans支持的新git用户无法从远程存储库中提取最新的提交 [英] new git user using netbeans support unable to pull latest commit from remote repository
问题描述
我是新的GIT用户,使用内置的NetBeans支持win7。我在另一台计算机上对我的项目文件进行了一些更改,并将它们提交给远程回购。当我尝试从远程存储库中获取最新版本时,出现以下错误:
== [IDE] = = 2012年11月13日下午11:35:27拉...
git pull bitbucket.org:kcsmith/b1.git + refs / heads / master:refs / remotes / origin / master
没有更新
合并结果:失败
由于以下文件原因/主合并HEAD失败:
C:\wamp\www\path\to\file
如何将最新版本拉到第二台电脑?
在此先感谢,
Bill
不是100%确定的。但是我非常有信心你的麻烦来自工作目录中没有记录的文件/更改。
首先检查工作目录 git的状态状态
。如果列出了文件,则需要添加它们( git add -A
)并提交它们( git commit
)你可以拉。 (在旁注中,不是提交,而是提交)
一旦完成并且 git状态
显示没有文件,您可以拉动远程存储库。
这种行为可以防止在合并过程中丢失未保存的工作(<通过 merge
) fetch
>。
I am a new GIT user, using the built in NetBeans support on win7. I have made some changes to my project files on a different computer, and committed them to the remote repo. When I try to pull this latest version from my remote repository, I am getting the following error:
==[IDE]== Nov 13, 2012 11:35:27 PM Pulling...
git pull bitbucket.org:kcsmith/b1.git +refs/heads/master:refs/remotes/origin/master
No update
Merge Result: Failed
Merge of HEAD with origin/master failed because of these files:
C:\wamp\www\path\to\file
how can I pull the latest version to the second computer?
Thanks in advance,
Bill
I'm not 100% sure. But I'm pretty confident your trouble come from untracked file/changes in your working directory.
First, checkout the status of your working directory git status
. If there's files listed, you need to add them (git add -A
) and commit them (git commit
) before you can pull. (On a side note, instead of commiting, you could stash them)
Once this is done and that git status
show no files, you can pull the remote repository.
This behaviour prevent you from losing unsaved work during a merge process (as pull
aliases a fetch
following by a merge
).
这篇关于使用netbeans支持的新git用户无法从远程存储库中提取最新的提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!