简体   繁体   中英

Equivalent command of “Sync” on Github windows

Hi on Github for Windows you have this option : Sync

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

When i want to use my git bash i don't know the equivalent of this "sync"

I mean i have to differents branch and i want to update my branch with master.

Not a simple pull, i want to use rebase too.

It's seem the button "sync" do the rebae, so what is the equivalent command prompt ?

If i use git pull --rebase i have :

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 :

git fetch
git rebase master

If you want to merge the changes from master to your branch:

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. The primary project I work on uses this model .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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