Is there a config way to set this up without having to specify which branch?
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.
Git already only pulls the current branch. If you have branch set up as a tracking branch, you do not need to specify the remote branch.
git branch --set-upstream-to=reponame/remotebranch localbranchwill set up the tracking relationship. You then issuegit pull [--rebase]and only that branch will be updated.Of course, all remote tracking branches and all refs for the remote will be updated, but only your local tracking branch will be modified.
Useful Bash alias to cut down on typing of this common operation:
Powershell function that does the same: