如何在 gitg / gitx 可视化工具中执行 git pull 操作?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7299237/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how can I do a git pull in the gitg / gitx visual tool?
提问by Michael Durrant
I can do a push using gitg and push my code to the remote master branch but I can't see any option to do a git pull.
我可以使用 gitg 进行推送并将我的代码推送到远程 master 分支,但我看不到任何执行 git pull 的选项。
I am on Ubuntu 10 and 11
我在 Ubuntu 10 和 11
回答by CharlesB
You cannot directly pull from git gui
, but given than a pull
is a fetch
followed by a merge
, you can fetch the remote (in the remote menu and fetch from
), and then merge the remote branch into yours (Merge menu and Local merge
, select tracking branch
).
您不能直接从 中拉取git gui
,但是给定pull
afetch
后跟 a merge
,您可以获取远程(在远程菜单和 中fetch from
),然后将远程分支合并到您的分支中(合并菜单和Local merge
选择tracking branch
)。
回答by CharlesB
In gitg 0.2.4, you cannot pull directly, so you also fetch and merge:
在 gitg 0.2.4 中,你不能直接拉,所以你也取并合并:
- fetch by going in the repository properties, select the remote repo and cli
- display all branches of the remote, and merge the branch you want (
origin/master
most of the time) by right-clicking on the tip of the branch
- 通过进入存储库属性获取,选择远程存储库和 cli
- 显示遥控器的所有分支,并
origin/master
通过右键单击分支的尖端来合并您想要的分支(大多数情况下)