Beginning Git - Part 11: Syncing with a Remote | Ray Wenderlich

Now that you’ve been working hard on your local copy of the Git repository, you want to know how you can share this with your friends. See how you can share through using remotes, and how you can use multiple remotes at the same time.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4418-beginning-git/lessons/11

Hey Sam, Thanks for the tutorial.
Ive been mostly dealing the traditional push and pull only! but this was exciting :smile:

1 Like

Glad you found it useful :smiley:

Hello. I’ve been enjoying this Git tutorial. At some point, I think I got confused with git push -u origin master vs git push origin master? To confirm, are they the same thing?

Also --set-upstream is same as --track right?

Hi @arviio

git push -u origin master is the same as git push --set-upstream origin master. If you missed the -u off, then all it means is that the local branch won’t be set up as a tracking branch. If it’s already set up to track the remote branch, then it makes no difference.

--track isn’t an option on git push, but it is on git checkout, where it effectively performs the same as --set-upsteam does on git push. The difference is that with git push --set-upstream you’re pushing your branch to a remote branch and marking it as a tracking branch, whereas with git checkout --track you’re creating a local branch from a remote branch, and setting it to track that remote branch.

Hope that helps

sam

Looks like episode 11 should be updated. Nowadays we cannot see fork’s graph by tapping on “Fork” button. Seems GitHub moved this functionality to “Insights” → “Network”

1 Like

@andrius thanks for highlighting this—this can be addressed in a future update, and your comment will help other learners as they work through the videos. Thanks!