/d/test/work/gits/pp (master)
$ git branch -l
  dev
* master

릴리즈용 브랜치 이름이 branch/release/20220226(0_1) 이런 식으로 리모트 브랜치 이름 그대로 로컬 브랜치 이름 만들었다가 마음에 안드는 경우가 있다. 

/d/test/work/gits/pp (master)
$ git branch -m master main

/d/test/work/gits/pp (main)
$

git branch -m <old name> <new name> 을 이용해서 브랜치 이름을 변경할 수 있다.

참고 : https://git-scm.com/docs/git-branch

 

Git - git-branch Documentation

If --list is given, or if there are no non-option arguments, existing branches are listed; the current branch will be highlighted in green and marked with an asterisk. Any branches checked out in linked worktrees will be highlighted in cyan and marked with

git-scm.com

(2022-03-05) P.S. remote 브랜치와 이름이 다르면 push 할 때 살짝 번거로울 수 있다.

728x90

+ Recent posts