DEV Community

Discussion on: Git hacks you should know about

Collapse
 
kapral18 profile image
Karen Grigoryan

Hey, thanks for sharing.

Couple of notes:

git branch -m relaese release

is a bit confusing i'd suggest changing to:

Rename branch locally

git branch -m old_branch new_branch

Delete the old remote branch

git push origin :old_branch

Push the new branch, set local branch to track the new remote

git push --set-upstream origin new_branch
Collapse
 
iankurbiswas profile image
Ankur Biswas

Thanks for describing in detailed way 😁

Collapse
 
tcelestino profile image
Tiago Celestino

I always forgot the command to push a delete branch on remote.