我在Git For Windows (以前称为msysgit) 1.7.10.msysgit.1上运行Git扩展2.32。
另一个用户创建了一个新分支,并将其推送到远程存储库。我想将这个新分支获取到我的本地存储库。
显示了我正在尝试做的事情。主服务器当前已签出,另一个用户添加了一个新的分支"brentfo",他已将其推送到远程存储库。现在,我想将这个新分支获取到我的本地存储库。
我打开Git扩展拉入对话框,如图所示。我选择了新的远程分支"brentfo“,选择了合并选项”不合并,只获取远程更改“。当我点击Pull按钮时,我会看到一个进度对话框:
c:\Program F
我有一个git本地分支跟踪远程svn主干。
我创建了一个新的开发分支,并设置本地分支来跟踪它。
我希望开发分支也将跟踪svn/主干,类似于:
from:
local branch > development branch
to:
local branch > development branch > svn/trunk
用git可以做吗?
我使用的是git版本2.14.3
git GUI - smartgit git v18.1
在使用GUI对远程分支releases/rel_5.4.1进行签出之后,当我尝试push时,我看到了这条意外的错误消息
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:releases/rel_5.4.1
To push to the branch of the same name on the
当您执行git pull时,Git正确地给出了一个错误,而提交合并将创建一个本地文件,但未被跟踪。
错误:以下未跟踪的工作树文件将被合并覆盖
我想在脚本中检测到这种情况,这样我就可以在实际执行git拉之前对它做一些事情。
我该怎么做?我尝试了git pull --dry-run,但恼人的是没有注意到拉会失败(gitVersion2.11.0)
测试
mkdir a b; cd a
git init .; echo hi >file1 ; git add .; git commit -m "initial commit"
cd ../
git clone a b
c
我收到了这样一条错误消息:同步失败了。我环顾四周寻找解决方案,发现git status会给出一些关于这个问题的想法。所以我做了然后得到了这个
# On branch dev_0.9_HUD_development
# Your branch is behind 'origin/dev_0.9_HUD_development' by 1 commit, and can be
fast-forwarded.
# (use "git pull" to update your local branch)
#
# Changes not staged for
对于git,我做了一些修改,现在想把它们放在一个新的分支中。如何在几个地方解释这一点,例如
我的困惑更多地与这个任务的本地/远程方面有关。
我首先将github上的存储库分叉到myForkOnGitHubRepo。然后,我将该存储库克隆到本地PC上:
local: git clone myForkOnGitHubRepo
然后我改变了消息来源,发表并推介:
local: git add .
local: git commit
local: git push # (actually I used the minGW Gui for that one since the command line