Information Technology Reference
In-Depth Information
1. He fetches your revisions: $ git fetch
2. He goes to the new-web-interface branch: $ git checkout
new-web-interface
3. He updates the new-web-interface branch: $ git rebase
origin/new-web-interface
Now he can inspect your new modifications and accept them (as in Recipe 10-8) or
ask for new improvements (as in Recipe 10-9). Because the leader created his local
new-web-interface branch with $ git checkout new-web-interface
command, the tracking was set up for the branch. As a consequence he can use: $ git
rebase while on new-web-interface to update this branch.
How It Works
The branch you use for contributions can be used by you and other members of your
team for a longer period of time. You can iteratively commit and ask for code review.
This can be repeated many times. The recipe explains how the leader can update his re-
pository with the latest changes in the new-web-interface branch.
Of course these same procedures:
• Appending new commits to a remote branch
• Downloading the most recent commits from remote branch
can be performed by every member. Thus you can use the new-web-interface
branch as a way to collaborate with others while working on a given feature.
10-10. Rewriting history with $ git push -
f
Problem
You are a member of a team. You pushed your work to a remote branch named new-
web-interface . Your work was rejected many times. You were asked to make cor-
Search WWH ::




Custom Search