git command¶
Delete branch¶
Delete local branch
$ git branch -D <branch_name>
Delete remote branch
$ git push <remote_name> --delete <branch_name>
Tag¶
Add tag to current submit
$ git tag -a <tag_name> -m <comment>
List all tags
$ git tag -l
Delete local tag
$ git tag -d <tag_name>
Delete remote tag
$ git push --delete origin <tag_name>
Remote¶
Set up upstream remote
git remote add upstream https://github.com/repo
Update local repo
git pull upstream <branch_name>
Push to upstream
git push upstream <branch_name>