Skip to content

Commit ea4fa23

Browse files
committed
rebase
1 parent a5033d3 commit ea4fa23

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎book/05-distributed-git/sections/maintaining.asc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ When a topic branch has finally been merged into `master`, it's removed from the
354354
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.
355355
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.
356356

357+
[[_rebase_cherry_pick]]
357358
===== Rebasing and Cherry Picking Workflows
358359

359360
(((workflows, rebasing and cherry-picking)))

‎book/07-git-tools/sections/replace.asc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[[_replace]]
12
=== Replace
23

34
Git's objects are unchangable, but it does provide an interesting way to pretend to replace objects in it's database with other objects.

‎book/C-git-commands/1-git-commands.asc‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,22 @@ A few commands in Git are centered around the concept of thinking of commits in
347347

348348
==== cherry-pick
349349

350+
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.
351+
352+
Cherry picking is described and demonstrated in <<_rebase_cherry_pick>>.
353+
350354
==== rebase
351355

356+
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.
357+
358+
Rebasing is covered in detail in <<_rebasing>>, including covering the collaborative issues involved with rebasing branches that are already public.
359+
360+
We use it in practice during an example of splitting your history into two seperate repositories in <<_replace>>, using the `--onto` flag as well.
361+
362+
We go through running into a merge conflict during rebasing in <<_rerere>>.
363+
364+
We also use it in an interactive scripting mode with the `-i` option in <<_changing_multiple>>.
365+
352366
==== revert
353367

354368

0 commit comments

Comments
 (0)