-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommands.txt
More file actions
273 lines (195 loc) · 6.54 KB
/
Commands.txt
File metadata and controls
273 lines (195 loc) · 6.54 KB
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.
E:\Tahir>git --version
git version 2.15.1.windows.2
E:\Tahir>git init
Initialized empty Git repository in E:/Tahir/.git/
E:\Tahir>git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
Tahir.txt
nothing added to commit but untracked files present (use "git add" to track)
E:\Tahir>git add .
E:\Tahir>git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: Tahir.txt
E:\Tahir>git remote add origin "https://github.com/mtahirofficial/myFirstRepo.git"
E:\Tahir>git push origin master
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/mtahirofficial/myFirstRepo.git'
E:\Tahir>git commit -m "This is
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'MT161@DESKTOP-TGM52G7.(none)')
E:\Tahir>git commit -m "This is Tahis"
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'MT161@DESKTOP-TGM52G7.(none)')
E:\Tahir>git config --global user.email "[email protected]"
E:\Tahir>git config --global user.name "mtahirofficial"
E:\Tahir>git commit -m "This is Tahis"
[master (root-commit) f0ef118] This is Tahis
1 file changed, 1 insertion(+)
create mode 100644 Tahir.txt
E:\Tahir>git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 223 bytes | 223.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/mtahirofficial/myFirstRepo.git
* [new branch] master -> master
E:\Tahir>git branch
* master
E:\Tahir>git checkout master
Already on 'master'
E:\Tahir>git checkout -b latestBranch
Switched to a new branch 'latestBranch'
E:\Tahir>git branch
* latestBranch
master
E:\Tahir>git checkout master
Switched to branch 'master'
E:\Tahir>git branch
latestBranch
* master
E:\Tahir>git pull origin master
From https://github.com/mtahirofficial/myFirstRepo
* branch master -> FETCH_HEAD
Already up to date.
E:\Tahir>git checkout latestBranch
Switched to branch 'latestBranch'
E:\Tahir>git branch
* latestBranch
master
E:\Tahir>git push origin latestBranch
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/mtahirofficial/myFirstRepo.git
* [new branch] latestBranch -> latestBranch
E:\Tahir>git add .
E:\Tahir>git push origin latestBranch
Everything up-to-date
E:\Tahir>git commit -m "This is new branch file"
[latestBranch 24ba5a1] This is new branch file
1 file changed, 1 insertion(+)
create mode 100644 newTahir.txt
E:\Tahir>git push origin latestBranch
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 295 bytes | 295.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/mtahirofficial/myFirstRepo.git
f0ef118..24ba5a1 latestBranch -> latestBranch
E:\Tahir>git branch
* latestBranch
master
E:\Tahir>git add .
E:\Tahir>git commit -m "asdasd"
[latestBranch bf58029] asdasd
1 file changed, 1 insertion(+)
create mode 100644 new Branch.txt
E:\Tahir>git push origin latestBranch
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 302 bytes | 302.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/mtahirofficial/myFirstRepo.git
24ba5a1..bf58029 latestBranch -> latestBranch
E:\Tahir>git remote
origin
E:\Tahir>git branch
* latestBranch
master
E:\Tahir>git checkout master
Switched to branch 'master'
E:\Tahir>git checkout master
Already on 'master'
E:\Tahir>git show head
commit f0ef118f256647aad5d7a94262dd8975c7f03a91 (HEAD -> master, origin/master)
Author: mtahirofficial <[email protected]>
Date: Sun Dec 24 14:41:00 2017 +0500
This is Tahis
diff --git a/Tahir.txt b/Tahir.txt
new file mode 100644
index 0000000..22c2b08
--- /dev/null
+++ b/Tahir.txt
@@ -0,0 +1 @@
+this is tahir
\ No newline at end of file
E:\Tahir>git status
On branch master
nothing to commit, working tree clean
E:\Tahir>git add .
E:\Tahir>git commit -m "for reset"
[master d974a35] for reset
1 file changed, 1 insertion(+)
create mode 100644 for reset.txt
E:\Tahir>git status
On branch master
nothing to commit, working tree clean
E:\Tahir>git reset
E:\Tahir>git status
On branch master
nothing to commit, working tree clean
E:\Tahir>git push origin master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 283 bytes | 283.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/mtahirofficial/myFirstRepo.git
f0ef118..d974a35 master -> master
E:\Tahir>git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
newReset.txt
nothing added to commit but untracked files present (use "git add" to track)
E:\Tahir>git reset hard
fatal: ambiguous argument 'hard': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
E:\Tahir>git reset --hard
HEAD is now at d974a35 for reset
E:\Tahir>git pull origin master
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/mtahirofficial/myFirstRepo
* branch master -> FETCH_HEAD
d974a35..a937be4 master -> origin/master
Updating d974a35..a937be4
Fast-forward
README.md | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 README.md
E:\Tahir>git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
newReset.txt
nothing added to commit but untracked files present (use "git add" to track)
E:\Tahir>git add .
E:\Tahir>git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: newReset.txt
E:\Tahir>git reset --hard
HEAD is now at a937be4 Create README.md
E:\Tahir>