Git manage branches
mouse 357 · person cloud · link
Last update
2019-07-08
2019
07-08
« — »
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
git checkout -b <branch>          # create branch
git push -u origin <branch>       # push branch to remote

# pull the new branch from another pc:
git fetch                         # download all data
git branch -v -a                  # shows avaiable branches
git checkout <branch>

# delete branch
git push origin :<branch>         # remote
git branch -d <branch>            # local

# rename branch
git branch -m old-name new-name       # local
git push -u origin :old-name new-name # remote