-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Unicar
committed
Oct 8, 2018
1 parent
27b2dc1
commit 2b6b710
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
HTML comments inside of JSX won't work, you need to use JavaScript block comments and wrap them in curly brases: | ||
|
||
1. Rename a local branch | ||
|
||
if you are on the branch you want to rename: | ||
```Git | ||
git branch -m new-name | ||
``` | ||
if you are on a different branch: | ||
```Git | ||
git branch -m old-name new-name | ||
``` | ||
2. Delete the old-name remote branch and push the new-name local branch | ||
```Git | ||
git push origin :old-name new-name | ||
``` | ||
3. Reset the upstream branch with the new-name local branch | ||
```Git | ||
git push origin -u -m new-name | ||
``` | ||
source: [Rename a local and remote branch in git](https://multiplestates.wordpress.com/2015/02/05/rename-a-local-and-remote-branch-in-git/) |