diff --git a/README.md b/README.md index e4ec12e..764adb7 100644 --- a/README.md +++ b/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) @@ -341,5 +342,16 @@ __Alternatives:__ git cherry -v master ``` +## Rename a branch +```sh +git branch -m +``` + + +__Alternatives:__ +```sh +git branch -m [] +``` + diff --git a/tips.json b/tips.json index 8afe58e..fc11b11 100644 --- a/tips.json +++ b/tips.json @@ -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 "] + }, + { + "title": "Rename a branch", + "tip": "git branch -m ", + "alternatives": ["git branch -m [] "] } ]