What is the difference between "git push" and "git push origin master"?
1 answer
git push
assumes that you already have a remote repository defined for that branch. In this case, the remote origin
default is used.
git push origin master
indicates that you are pressing a specific remote, in this case origin
.
This will matter if you've created multiple remote repositories in your codebase. If you are running only one remote repository (in this case, just your GitHub repository), then there is no difference between the two.
+7
source to share