-
Notifications
You must be signed in to change notification settings - Fork 0
/
LearningGit.txt
110 lines (81 loc) · 1.59 KB
/
LearningGit.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
mkdir folder
cd folder
tree
git init
git add .
git commit -m "msg"
code .
git status
git add first.txt
git status
git commit -m "msg"2
git status
git log
git diff no no
git checkout no // to go back in time
pwd
cd
ls (dir)
mkdir
touch (copy con)
git config --global user.name "Swadi K"
git config --global user.email "kswadi01@gmail.com"
git config
git config user.name
Created repository in github
copied https
git remote add origin https...
git push -u origin master
git status --short
m=modified
a=new file in staging
??=untracked
git diff --staged
git diff --staged --no-renames
git diff
git commit -a //to skip stagein g (git add filename)
git push origin master
git log -2
git log --oneline
git log --stat
git log --patch
http://chris.beams.io/posts/git-commit
git rm filename
git rm --cached filename // making git not track it
git mv oldname newname
http://git-school.github.io/visualizing-git/
git commit
git checkout -b new_branch
git checkout master
git add .
git stash //for untracked file
git stash list
git stash show
git merge new_branch
git reset --soft
git reset --mixed
git reset --hard //trash
ls -a
git cat-file -p numbers
git count-objects
git tag -a mytag -m "msg"
git tag
git cat-file -p mytag
git branch
git branch branchname
git checkout branchname
git merge branchname
git status
// resolve conflicts
git status
git add filename
git commit
git rebase master
git clone ....
git branch --all
git show-ref master
git push
git push -f
git fetch
git merge
git pull