Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rebase
  • Loading branch information
schacon committed Oct 13, 2014
commit ea4fa232c9d9abdc4f774cf33053257f25022fbb
1 change: 1 addition & 0 deletions book/05-distributed-git/sections/maintaining.asc
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ When a topic branch has finally been merged into `master`, it's removed from the
The Git project also has a `maint` branch that is forked off from the last release to provide backported patches in case a maintenance release is required.
Thus, when you clone the Git repository, you have four branches that you can check out to evaluate the project in different stages of development, depending on how cutting edge you want to be or how you want to contribute; and the maintainer has a structured workflow to help them vet new contributions.

[[_rebase_cherry_pick]]
===== Rebasing and Cherry Picking Workflows

(((workflows, rebasing and cherry-picking)))
Expand Down
1 change: 1 addition & 0 deletions book/07-git-tools/sections/replace.asc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[[_replace]]
=== Replace

Git's objects are unchangable, but it does provide an interesting way to pretend to replace objects in it's database with other objects.
Expand Down
14 changes: 14 additions & 0 deletions book/C-git-commands/1-git-commands.asc
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,22 @@ A few commands in Git are centered around the concept of thinking of commits in

==== cherry-pick

The `git cherry-pick` command is used to take the change introduced in a single Git commit and try to re-introduce it as a new commit on the branch you're currently on. This can be useful to only take one or two commits from a branch individually rather than merging in the branch which takes all the changes.

Cherry picking is described and demonstrated in <<_rebase_cherry_pick>>.

==== rebase

The `git rebase` command is basically an automated `cherry-pick`. It determines a series of commits and then cherry-picks them one by one in the same order somewhere else.

Rebasing is covered in detail in <<_rebasing>>, including covering the collaborative issues involved with rebasing branches that are already public.

We use it in practice during an example of splitting your history into two seperate repositories in <<_replace>>, using the `--onto` flag as well.

We go through running into a merge conflict during rebasing in <<_rerere>>.

We also use it in an interactive scripting mode with the `-i` option in <<_changing_multiple>>.

==== revert


Expand Down