Commit 7816f2cd authored by Adam Brenecki's avatar Adam Brenecki

Add single commit rebase command

parent fc803533
Pipeline #30999926 passed with stages
in 2 minutes and 42 seconds
......@@ -22,6 +22,7 @@ git branch -f branch-to-move ref-to-move-to
### Rebasing
Basic usage: Cut the branch from `snip-from` to `snip-to`, and graft it onto `graft-point`. If not specified, `snip-to` is the current branch, `graft-point` is the current branch's upstream, and `snip-from` is their common ancestor.
```sh
git rebase [--onto graft-point] snip-from snip-to
```
......@@ -55,6 +56,12 @@ git branch -f feature-branch-a origin/feature-branch-a
git rebase --onto master feature-branch-a
```
Move a single commit from a feature branch onto master:
```sh
git rebase --onto HEAD 0a10113^ 0a10113
```
## Easily Squashing a Branch
If you have a whole bunch of changes on `branchA` that you want to squash onto `branchB`:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment