Usually, a local branch tracks a remote branch. The remote branch will be updated when pushing or pulling.
But what is the purpose of letting a local branch track another local branch?
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.
When you work with Git and you have multiple features you are working on simultaneously, it is good practice to have a separate branch for each feature. When a feature is completed, you push it into the main branch.
The other branches should then pull from the main branch to make sure that their changes are compatible with the completed branch so that potential merge problems are detected early.
In that case it would be convenient when all feature branches would track the local main branch.