aboutsummaryrefslogtreecommitdiff
path: root/git.cheat
blob: 33f396eb4662ba7b1376b5f05d4e43f8b27de629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
% git

# Fixup commit
git commit --fixup <commit_id>

# Rebase
git rebase -i <commit_id>

# Checkout
git checkout <branch>

# Delete a branch
git branch -d <branch>

# Get the remote url of origin
git remote get-url origin

$ commit_id: git log --pretty=reference --- --column 1 --delimiter '\s'
$ branch: git branch | awk '{print $NF}'