Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As the title suggests, which operations does the "sync branch" perform on the github application for OS X? Does it do a full clone of the repo again?

share|improve this question
    
I would assume it pulls the latest commits from the remote. –  Oliver Salzburg Oct 21 '13 at 9:55

1 Answer 1

According to this article on GitHub app documentation:

No, SyncBranch doesn't perform a full clone of the repo. It just pull the changes in origin and push all the commits you haven't pushed yet, all in a single step.


See full article content:

How can I push or pull?

If your repository has a remote connected, we encourage you to use the Sync Branch button. In one step, we'll bring in new changes from the remote and push any commits you haven't published yet. Behind the scenes, we do the equivalent of a git pull --rebase (but make sure to never rewrite merges).

enter image description here

If you would like to perform a standard pull or push without syncing everything, you can do so via the Repository menu item.

enter image description here

share|improve this answer
    
Hmm. This is odd. I have 2 branches; master and dev. My remote repo always sits on the master brach. I develop locally on the dev brach. When I commit changes, I use the "commit and sync" button. This pushes my changes to my remote repo. I then go onto my remote machine and run "git merge dev master". This moves all my changes from dev to master. If on my local machine I run "git pull --rebase", it doesn't seem to do the same as the "sync branch" button. The main difference is that the master branch doesn't get updated (it says "merge dev master" on the master branch when I use sync branch). –  dotty Oct 21 '13 at 12:14
    
It seems that the sync branch button actually loops through the branches and performs a git pull on each one. –  dotty Oct 21 '13 at 13:34
    
@dotty, yes, it probably does that, since it says it brings in new changes from the remote, and I understand it means ALL new changes, and that would mean all the changes in all the branches... –  MikO Oct 21 '13 at 14:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.