How to remove a local branch, remote branch, or tag.
I forget how to do it every time, so I output it.
目次
Pull remote branch to local branch
List of local branches
$ git branch
* master
devList of remote branches
$ git branch -r
origin/HEAD -> origin/master
origin/testModernize local remote branches
$ git fetchPull remote branch differences to local branch
$ git pull origin <REMOTE-BRANCH-NAME>: <LOCAL-BRANCH-NAME> </REMOTE-BRANCH-NAME>Delete a local branch
$ git branch --delete <LOCAL-BRANCH-NAME>Remove a remote tag
$ git tag -d <TAG-NAME>
$ git push --delete origin <TAG-NAME> </TAG-NAME>Delete a remote branch
$ git branch -d <REMOTE-BRANCH-NAME>
$ git push --delete origin <REMOTE-BRANCH-NAME> </REMOTE-BRANCH-NAME>Add: Bring a remote branch locally
$ git checkout -b dev origin/dev* dev is the name of the local branch. origin/dev is the name of the remote branch.


