git
This is an old revision of the document!
Table of Contents
Git Cheat Sheet
Branches
Create a new branch from current changes
$ git checkout -b <new branch>
Create upstream branch from local branch
Commit any local changes then:
$ git push -u origin <new branch>
Delete a local branch
$ git branch -D <branchName> Deleted branch <branchName> (was ....).
Delete a remote branch
$ git push origin --delete <branchName> To git@github.com:<repository>.git - [deleted] <branchName>
Merge
Merge branch into current branch
$ git merge <branch>
git.1466079884.txt.gz · Last modified: 2023/08/18 18:15 (external edit)