From 9df645524982c12be6e70c5d58f4002f2244b399 Mon Sep 17 00:00:00 2001 From: Kevin Rabaev Date: Sat, 13 Sep 2025 19:09:01 +0300 Subject: [PATCH] Enhance the push cmd to also track the newly pushed branch --- book/05-distributed-git/sections/contributing.asc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/05-distributed-git/sections/contributing.asc b/book/05-distributed-git/sections/contributing.asc index 2c6b08516..63728afbc 100644 --- a/book/05-distributed-git/sections/contributing.asc +++ b/book/05-distributed-git/sections/contributing.asc @@ -582,7 +582,7 @@ For example, if you want to submit a second topic of work to the project, don't $ git checkout -b featureB origin/master ... work ... $ git commit -$ git push myfork featureB +$ git push -u myfork featureB $ git request-pull origin/master myfork ... email generated request pull to maintainer ... $ git fetch origin @@ -623,7 +623,7 @@ $ git checkout -b featureBv2 origin/master $ git merge --squash featureB ... change implementation ... $ git commit -$ git push myfork featureBv2 +$ git push -u myfork featureBv2 ---- The `--squash` option takes all the work on the merged branch and squashes it into one changeset producing the repository state as if a real merge happened, without actually making a merge commit.