add the old snippet md files

This commit is contained in:
Travis Shears 2025-06-05 16:20:57 +02:00
parent fc0dd204c7
commit bcf8313a4b
110 changed files with 3048 additions and 0 deletions

View file

@ -0,0 +1,21 @@
---
title: "move branch"
date: 2020-01-11T05:06:49+01:00
draft: false
snippet_types: ["git"]
---
```shell
$ git rebase source-commit --onto target-branch
```
Sometimes you need to start a new feature branch but the place you need to base the branch is not
ready yet, say coworker has merged his changes to a stage branch but not master. With this work flow
you simply start your branch off stage then move to master later. **git branch -m new-name** also
comes in handy to rename the branch after you've moved it if need be.
source:
[makandracards](https://makandracards.com/makandra/10173-git-how-to-rebase-your-feature-branch-from-one-branch-to-another)
[w3docs](https://www.w3docs.com/snippets/git/how-to-rename-git-local-and-remote-branches.html)