progit2
progit2 copied to clipboard
Enhance the push cmd to also track the newly pushed branch
- [X] I provide my work under the project license.
- [X] I grant such license of my work as is required for the purposes of future print editions to Ben Straub and Scott Chacon.
Changes
The git push examples for new branches have been updated to include the -u flag, which sets the upstream tracking branch.
Context
This change adds the -u flag to the initial git push for these new branches. Because these branches are newly created locally, they don't yet track a remote branch. This update makes the examples consistent with others in the section and reflects a modern best practice that simplifies all future push and pull commands.