mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
Added how to rename a local branch (#128)
This commit is contained in:
parent
4547f3ea98
commit
e2ddb7fe55
16
README.md
16
README.md
@ -47,6 +47,7 @@ For clarity's sake all examples in this document use a customized bash prompt in
|
||||
- [I want to delete local branches that were deleted upstream](#i-want-to-delete-local-branches-that-were-deleted-upstream)
|
||||
- [I accidentally deleted my branch](#i-accidentally-deleted-my-branch)
|
||||
- [I want to delete a branch](#i-want-to-delete-a-branch)
|
||||
- [I want to rename a branch](#i-want-to-rename-a-branch)
|
||||
- [I want to checkout to a remote branch that someone else is working on](#i-want-to-checkout-to-a-remote-branch-that-someone-else-is-working-on)
|
||||
- [Rebasing and Merging](#rebasing-and-merging)
|
||||
- [I want to undo rebase/merge](#undo-rebase)
|
||||
@ -601,6 +602,21 @@ To delete a local branch:
|
||||
(master)$ git branch -D my-branch
|
||||
```
|
||||
|
||||
<a name="i-want-to-rename-a-branch"></a>
|
||||
### I want to rename a branch
|
||||
|
||||
To rename a local current branch:
|
||||
|
||||
```sh
|
||||
(master)$ git branch -m new-name
|
||||
```
|
||||
|
||||
To rename a local different branch:
|
||||
|
||||
```sh
|
||||
(master)$ git branch -m old-name new-name
|
||||
```
|
||||
|
||||
<a name="i-want-to-checkout-to-a-remote-branch-that-someone-else-is-working-on"></a>
|
||||
### I want to checkout to a remote branch that someone else is working on
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user