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.
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?
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.
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”
@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!