1
mirror of https://github.com/RealOrangeOne/notes.git synced 2024-06-29 05:46:59 +01:00

Add note about rebasing

This commit is contained in:
Jake Howard 2020-10-07 18:03:05 +01:00
parent b9cac95249
commit 5f6546f775
Signed by: jake
GPG Key ID: 57AFB45680EDD477

12
notes/git/rebase-onto.md Normal file
View File

@ -0,0 +1,12 @@
---
title: Rebase commits done on the wrong branch
tags:
- Git
link: https://git-scm.com/book/en/v2/Git-Branching-Rebasing#_more_interesting_rebases
---
```sh
git rebase --onto master server client
```
> Take the `client` branch, figure out the patches since it diverged from the `server` branch, and replay these patches in the client branch as if it was based directly off the `master` branch instead.