forked from raushan8586/raushan_simplilearn_repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit_commnds_27112022
201 lines (201 loc) · 3.93 KB
/
git_commnds_27112022
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
[root@ip-172-31-88-192 project1]# history
1 git version
2 yum install git
3 clear
4 git version
5 pwd
6 mkdir project1
7 cd project1/
8 pwd
9 ls -l
10 ls -la
11 pwd
12 ls -la
13 clear
14 git init
15 ls -l
16 ls -la
17 pwd
18 cd ..
19 mkdir project2
20 cd project
21 cd project2
22 ls -l
23 clear
24 pwd
25 ls -l
26 ls -la
27 git clone https://github.com/raushan8586/clone-demo.git
28 ls -l
29 cd clone-demo/
30 ls -l
31 ls -la
32 pwd
33 cd ..
34 ls -la
35 pwd
36 cd ../project1
37 clear
38 pwd
39 ls -la
40 cd ../project2
41 cd clone-demo/
42 ls -la
43 ls -l
44 git ls-files
45 cd ../../prpject1
46 cd ../../project1
47 clear
48 ls -l
49 touch sample1.txt
50 vi sample1.txt
51 cat sample1.txt
52 ls -l
53 git ls-files
54 git status
55 git branch
56 git branch b1 master
57 git status
58 clear
59 ls -l
60 git status
61 git add sample1.txt
62 git status
63 git commit sample1.txt
64 git commit sample1.txt "first-commit"
65 git ls-files
66 clear
67 touch sample2.txt
68 git status
69 git add sample2.txt
70 git status
71 git commit -m "first-commit"
72 git status
73 git ls-files
74 ls -l
75 clear
76 touch sample3.txt
77 vi sample3.txt
78 git status
79 git add sample3.txt
80 git status
81 git commit -m "2nd-commit"
82 git status
83 ls -l
84 git ls-files
85 clear
86 touch file1.txt
87 git add file1.txt
88 git ls-files
89 git status
90 touch file2.txt
91 git ls-files
92 git restore --staged file1.txt
93 git ls-files
94 git status
95 git ls-files
96 ls -l
97 git ls-files
98 git status
99 git add .
100 git status
101 git ls-files
102 git status
103 git commit -m "3rd-commit"
104 git status
105 git ls-files
106 pwd
107 ls -l
108 pwd
109 git push https://github.com/raushan8586/clone-demo.git
110 clear
111 git remote add origin https://github.com/raushan8586/clone-demo.git
112 git remote -v
113 git push origin master
114 history
115 clear
116 git log
117 git log --oneline
118 git branch
119 git branch b1 master
120 git branch
121 pwd
122 ls -la
123 git ls-files
124 git checkout b1
125 git branch
126 ls -l
127 git ls-files
128 touch app1
129 git add app1
130 git commit -m "app1-b1-commited"
131 git ls -files
132 git ls-files
133 git checkout master
134 git branch
135 git ls-files
136 pwd
137 git branch
138 git branch b2 master
139 git branch
140 git checkout b2
141 git branch
142 git log --oneline
143 git checkout b1
144 git log --oneline
145 git branch
146 git checkout master
147 fit branch
148 git branch
149 git log --oneline
150 git merge b1 master
151 git log --oneline
152 git ls-files
153 git remote -v
154 git push origin b1
155 ls -l
156 pwd
157 git branch
158 git checkout b1
159 ls -l
160 mkdir application1
161 cd application1
162 touch dev1
163 ls -la
164 cd ..
165 ls -l
166 git ls-files
167 git status
168 git add application1/
169 git status
170 git commit -m "b1-application1-folder-added"
171 git ls-files
172 ls -l
173 git checkout b2
174 git checkout master
175 git ls-files
176 git branch
177 ls -l
178 git ls-files
179 ls -l
180 rm file1.txt
181 ls -l
182 git ls-files
183 git status
184 ls -l
185 git restore file1.txt
186 ls -l
187 git status
188 git rm file.txt
189 git rm file1.txt
190 ls -l
191 git ls-files
192 git status
193 git restore --staged file1.txt
194 ls -l
195 git ls-files
196 git status
197 git restore file1.txt
198 ls -l
199 git ls-files
200 history