简体   繁体   English

在Github窗口上等效的“同步”命令

[英]Equivalent command of “Sync” on Github windows

Hi on Github for Windows you have this option : Sync 您好,在Windows的Github上,您可以选择以下选项: 同步

http://i.gyazo.com/57e89b2b267e73b22ea1fb68555383c2.png

When i want to use my git bash i don't know the equivalent of this "sync" 当我想使用git bash时,我不知道这个“同步”的等效项

I mean i have to differents branch and i want to update my branch with master. 我的意思是我必须进入Differents分支,并且我想用master更新我的分支。

Not a simple pull, i want to use rebase too. 不是简单的拉动,我也想使用rebase。

It's seem the button "sync" do the rebae, so what is the equivalent command prompt ? 似乎按钮“ sync”执行恢复操作,那么等效的命令提示符是什么?

If i use git pull --rebase i have : 如果我使用git pull --rebase我有:

There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> foundation_grunt

If you want to rebase your branch so it is based off the current master : 如果您想重新设置分支基础,使其基于当前的master

git fetch
git rebase master

If you want to merge the changes from master to your branch: 如果要合并从master到分支的更改:

git fetch
git merge master

I do not know which would be the equivalent of "Sync", but I usually rebase my branch from master , checkout master , then merge my branch, as I find this usually results in the cleanest history. 我不知道哪个等同于“同步”,但是我通常从master ,checkout master分支分支,然后合并我的分支,因为我发现这通常导致最干净的历史记录。 The primary project I work on uses this model . 我从事的主要项目使用此模型

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM