mirror of
https://github.com/namibia/tips.git
synced 2025-01-03 14:17:28 +00:00
tip to rename a branch
This commit is contained in:
parent
9f996ee129
commit
274f663e6b
12
README.md
12
README.md
@ -49,6 +49,7 @@
|
||||
* [Forcefully remove untracked directory](https://github.com/git-tips/tips#forcefully-remove-untracked-directory)
|
||||
* [Update all the submodules](https://github.com/git-tips/tips#update-all-the-submodules)
|
||||
* [Show all commits in the current branch yet to be merged to master](https://github.com/git-tips/tips#show-all-commits-in-the-current-branch-yet-to-be-merged-to-master)
|
||||
* [Rename a branch](https://github.com/git-tips/tips#rename-a-branch)
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end toc -->
|
||||
@ -341,5 +342,16 @@ __Alternatives:__
|
||||
git cherry -v master <branch-to-be-merged>
|
||||
```
|
||||
|
||||
## Rename a branch
|
||||
```sh
|
||||
git branch -m <new-branch-name>
|
||||
```
|
||||
|
||||
|
||||
__Alternatives:__
|
||||
```sh
|
||||
git branch -m [<old-branch-name>] <new-branch-name>
|
||||
```
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end -->
|
||||
|
@ -191,5 +191,10 @@
|
||||
"title": "Show all commits in the current branch yet to be merged to master",
|
||||
"tip": "git cherry -v master",
|
||||
"alternatives": ["git cherry -v master <branch-to-be-merged>"]
|
||||
},
|
||||
{
|
||||
"title": "Rename a branch",
|
||||
"tip": "git branch -m <new-branch-name>",
|
||||
"alternatives": ["git branch -m [<old-branch-name>] <new-branch-name>"]
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user