Is there a way on GIT to just do a “git push” and it automatically send to “origin master” without specify that?
Just curious…
Is there a way on GIT to just do a git push and it
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your master branch should be automatically setup so this works. If you are on some other branch, then you can use the git branch command with the –set-upstream option
It might be also the case that you don’t have a remote set, in the case when you have a bare and clean repository setup waiting for you to push to it for the first time, e.g. when you are setting up a repo on github. Assuming you have setup your remote you can push to the server with the -u option that will take care of the branch –set-upstream for you:
which is the same as: