-
Notifications
You must be signed in to change notification settings - Fork 1
/
git-cmd.txt
55 lines (43 loc) · 1.36 KB
/
git-cmd.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- Copy all new / modifiles files to .zip file at Destop:
zip ~/Desktop/mychange.pdf $({ (git ls-files --others --exclude-standard) ; (git ls-files --modified)})
- merge commits to one:
git rebase -i HEAD~<N>
pick, squash:
git commit --amend
git push origin xx -f
- lo tay commit
git reset
git revert <commit ID>
git push origin xxx -f
- xu ly conflic:
1/ fetch remote vs local branch master ==> git fetch origin master:master
2/ rebase master
3/ loop:
3.1/ git add .
3.2/ git rebase --continue
4/ git push xxx -f
5/ git rebase -i HEAD~2
6/ git push origin chapter_7 -f
- chi nen co 1 commit tren 1 branch
- su dung git reset HEAD~<so luong commit quay ve> de quay ve cac trang thai khac
- ko rebase dc vi co 1 comimt da merge cua branch khac:
git branch -D develop
git fetch sun develop:develop
git rebase develop
git add -A
git rebase --continue
Applying: Assign Trainee
git branch
assign_supervisor
* assign_trainee
develop
show_course
git push origin assign_trainee -f
- git stash: https://kipalog.com/posts/Su-dung-git-stash-hieu-qua
git stash save
git stash list
`stash@{0}: WIP on <branch-name>: <lastest commit>
stash@{1}: WIP on <branch-name>: <lastest commit>
stash@{2}: WIP on <branch-name>: <lastest commit>`
git stash pop stash@{1} -> get stash and drop stash
git stash clear -> clear all stash