git push
assumes that you already have a remote repository defined for that branch. In this case, the default remote origin
is used.
git push origin master
indicates that you are pushing to a specific remote, in this case, origin
.
This would only matter if you created multiple remote repositories in your code base. If you’re only committing to one remote repository (in this case, just your GitHub repository), then there isn’t any difference between the two.