我对这里可能出现的问题缺乏想法。我有一个不再拉或合并的存储库。 git status
告诉我,我是一个落后者,它可以快进,但拉动或合并都不做任何事情。我已经检查了很多其他问题,但他们的解决方案并不适用于此。
xxx@yyy MINGW64 //filesystem/directory (master)
$ git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
xxx@yyy MINGW64 //filesystem/directory (master)
$ git merge origin/master
Updating 4f3a29c..dbe3611
xxx@yyy MINGW64 //filesystem/directory (master)
$ git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
xxx@yyy MINGW64 //filesystem/directory (master)
$ git pull
Updating 4f3a29c..dbe3611
xxx@yyy MINGW64 //filesystem/directory (master)
$ git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
xxx@yyy MINGW64 //filesystem/directory (master)
$ git branch -vv
* master 4f3a29c [origin/master: behind 1] last commit message
xxx@yyy MINGW64 //filesystem/directory (master)
$ git merge origin/master
Updating 4f3a29c..dbe3611
xxx@yyy MINGW64 //filesystem/directory (master)
$ git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
有什么明显的东西我不见了吗?我的回购公司腐败了吗? v2.10.2给了我这个问题,更新到v2.11并且它仍然发生。谢谢你的帮助!
修改1 :来自git branch -a
$ git branch -a
* master
remotes/origin/master
编辑2 :重置,如@Vampire
所示 git reset --hard origin/branch
是给我的第一个命令:
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
我没有想过要检查锁文件,但确实存在。我删除了它,拉动工作。我不知道为什么拉和合并没有给我提示。谢谢你的帮助!
答案 0 :(得分:1)
我不知道它为什么会这样,但你可以用git reset --hard origin/master
在远程提交中重新命名本地分支,因为无论如何更新都是快进的。
答案 1 :(得分:0)
<form [formGroup]="form">
<div [formGroup]="passwords">
<div class="form-group">
<label>New password</label>
<input formControlName="newPassword" placeholder="Password" type="password">
</div>
<div class="form-group">
<label>Confirm password</label>
<input formControlName="confirmPassword" placeholder="Confirm password" type="password">
</div>
</div>
</form>
这应该让您的本地分支与master保持同步并突出显示任何冲突。
答案 2 :(得分:0)
您想将当前分支合并到主分支中吗?
在这种情况下,您需要执行以下操作
git checkout origin / master
git merge&#34;无论您当前的分支名称是什么&#34;。