Please help to clarify the question below.
I have done the following steps.
I would like to know, how would my colleague who has already checked out test branch,be able to see the latest changes that I did in step 5 .
First, when you create a branch, do so with git switch
: git switch -c test origin/master
, preferably after a git fetch
(in order for origin/master
to reflect the latest commit pushed there)
Then make sure your first push is git push -u origin test
in order to establish a remote tracking branch origin/test
, which will facilitate the subsequent pushes to that branch.
When you colleague do a git switch test
(after a fetch
), the default guess mode automatically establish a remote tracking branch (as if they typed git switch -c <branch> --track <remote>/<branch>
)
That is why a simple git pull
would be enough to update their local test branch after your step 5.
The only way to do this is, as suggested by @larsks, to issue a git pull
.
Instead, if anybody need to inspect changes before pulling them, he can:
git fetch --all
git diff HEAD..origin/<BRANCH-NAME>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.