-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewfile
487 lines (371 loc) · 15.9 KB
/
newfile
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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
bioinf
chr22_with_ERCC92.gtf
Desktop
Documents
Downloads
examples.desktop
get-docker.sh
miniconda3
Music
Pictures
project
Public
share
srr
SRR6213653_1.fastq.gz.partial
SRR949627_1.fastq.gz.partial
Templates
temt.txt
test2.sh
tutorial
Videos
Sat Oct 23 11:45:03 +08 2021
ls: cannot access 'xxxx': No such file or directory
# hanchochang @ ubuntu in ~/share on git:master x [17:51:04]
$ cd ../mynewrepo
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [17:51:24]
$ git status
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [17:51:50]
$ touch README
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [17:52:10]
$ git add README
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [17:52:24]
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: README
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [17:52:49]
$ touch newfile
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [17:54:54]
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: README
Untracked files:
(use "git add <file>..." to include in what will be committed)
newfile
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [17:55:03]
$ cd
# hanchochang @ ubuntu in ~ [17:56:08]
$ cat temt.txt >> mynewrepo/newfile
# hanchochang @ ubuntu in ~ [17:56:24]
$ cd mynewrepo
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [17:56:31]
$ cat newfile
bioinf
chr22_with_ERCC92.gtf
Desktop
Documents
Downloads
examples.desktop
get-docker.sh
miniconda3
Music
Pictures
project
Public
share
srr
SRR6213653_1.fastq.gz.partial
SRR949627_1.fastq.gz.partial
Templates
temt.txt
test2.sh
tutorial
Videos
Sat Oct 23 11:45:03 +08 2021
ls: cannot access 'xxxx': No such file or directory
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [17:56:37]
$ git add newfile
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [17:56:57]
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: README
new file: newfile
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [17:57:02]
$ git commit -m "My first commit"
[master (root-commit) f67c5d6] My first commit
2 files changed, 23 insertions(+)
create mode 100644 README
create mode 100644 newfile
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [17:58:02]
$ git commit
On branch master
nothing to commit, working tree clean
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [17:58:52] C:1
$ git status
On branch master
nothing to commit, working tree clean
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [18:00:05]
$ echo "Lockdown Learning Special: Introduction to Git" > README
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [18:02:42]
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README
no changes added to commit (use "git add" and/or "git commit -a")
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [18:02:53]
$ git commit -m "Changed README"
On branch master
Changes not staged for commit:
modified: README
no changes added to commit
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [18:05:48] C:1
$ git commit -a -m "Changed README"
[master 6483b2b] Changed README
1 file changed, 1 insertion(+)
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [18:06:21]
$ git diff
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [18:06:51]
$ git diff
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [19:01:43]
$ echo "This is a README file for a test project" >> README
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:02:40]
$ git diff
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:03:12]
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README
no changes added to commit (use "git add" and/or "git commit -a")
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:12:49]
$ git commit -a -m "A Second change to README"
[master 87819f9] A Second change to README
1 file changed, 1 insertion(+)
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [19:13:31]
$ git diff
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [19:13:53]
$ git log
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [19:14:56]
$ mkdir data
# hanchochang @ ubuntu in ~/mynewrepo on git:master o [19:46:21]
$ echo 'data' > .gitignore
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:46:53]
$ cp ~/chr22_with_ERCC92.gtf data/
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:47:32]
$ ls
data newfile README
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:47:35]
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
nothing added to commit but untracked files present (use "git add" to track)
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:47:51]
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
nothing added to commit but untracked files present (use "git add" to track)
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:49:19]
$ cat .gitignore
data
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:50:35]
$ git commit -a -m "Committing .gitignore"
On branch master
Untracked files:
.gitignore
nothing added to commit but untracked files present
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:53:49] C:1
$ echo "A destructive change" > README
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:55:28]
$ git commit -a -m "oops"
[master 6286598] oops
1 file changed, 1 insertion(+), 2 deletions(-)
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:55:56]
$ git log
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:56:12]
$ git diff
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:57:00]
$ git log
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:57:59]
$ git reset --hard 87819f90990f44e7aabedfa791eeff37110eed26
HEAD is now at 87819f9 A Second change to README
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:58:18]
$ cat README
Lockdown Learning Special: Introduction to Git
This is a README file for a test project
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [19:58:31]
$ git remote add origin https://github.com/pathscientist/git-test.git
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:16:42]
$ ls
data newfile README
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:16:48]
$ cd
# hanchochang @ ubuntu in ~ [20:16:55]
$ git remote add origin https://github.com/pathscientist/git-test.git
fatal: not a git repository (or any of the parent directories): .git
# hanchochang @ ubuntu in ~ [20:17:01] C:128
$ cd mynewrepo
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:20:24]
$ git remote add origin https://github.com/pathscientist/git-test.git
fatal: remote origin already exists.
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:20:31] C:128
$ git push origin master
Username for 'https://github.com': pathscientist
Password for 'https://pathscientist@github.com':
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/pathscientist/git-test.git/'
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:21:15] C:128
$ git push origin master
Username for 'https://github.com': ^C
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:23:32] C:130
$ git remote add origin https://github.com/pathscientist/git-test.git
fatal: remote origin already exists.
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:24:31] C:128
$ git push -u origin main
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:26:32] C:1
$ git config -l
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:28:59]
$ git pull -v
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:29:35] C:1
$ git config --global --unset credential.helper
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:34:04] C:5
$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:36:35] C:1
$ git push origin master
fatal: unable to access 'https://github.com/pathscientist/git-test.git/': gnutls_handshake() failed: Error in the pull function.
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:37:06] C:128
$ git push -u origin main
error: src refspec main does not match any.
error: failed to push some refs to 'https://github.com/pathscientist/git-test.git'
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:38:10] C:1
$ cd
# hanchochang @ ubuntu in ~ [20:41:30]
$ git --version
git version 2.17.1
# hanchochang @ ubuntu in ~ [20:41:36]
$ sudo apt-get install git
[sudo] password for hanchochang:
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.17.1-1ubuntu0.9).
The following packages were automatically installed and are no longer required:
efibootmgr libfwup1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 110 not upgraded.
# hanchochang @ ubuntu in ~ [20:42:09]
$ cd mynewrepo
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:44:06]
$ git remote add origin git@github.com:pathscientist/git-test.git
fatal: remote origin already exists.
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:44:26] C:128
$ git push -u origin master
Username for 'https://github.com': ^C
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:45:00] C:130
$ git push -u origin master
fatal: unable to access 'https://github.com/pathscientist/git-test.git/': gnutls_handshake() failed: Error in the pull function.
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:45:23] C:128
$ git push -u origin master
fatal: unable to access 'https://github.com/pathscientist/git-test.git/': Failed to connect to github.com port 443: Connection refused
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:45:49] C:128
$ git push -u origin master
fatal: unable to access 'https://github.com/pathscientist/git-test.git/': Failed to connect to github.com port 443: Connection refused
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:47:43] C:128
$ git push -u origin master
fatal: unable to access 'https://github.com/pathscientist/git-test.git/': gnutls_handshake() failed: Error in the pull function.
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:48:07] C:128
$ git push -u origin master
^C
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:48:41] C:130
$ git push origin master
fatal: unable to access 'https://github.com/pathscientist/git-test.git/': Failed to connect to github.com port 443: Connection refused
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:49:14] C:128
$ git remote add origin git@github.com:pathscientist/mynewrepo.git
fatal: remote origin already exists.
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:52:01] C:128
$ git push origin master
Username for 'https://github.com': pathscientist
Password for 'https://pathscientist@github.com':
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/pathscientist/git-test.git/'
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:52:31] C:128
$ git push origin master
Username for 'https://github.com': pathscientist
Password for 'https://pathscientist@github.com':
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/pathscientist/git-test.git/'
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:53:14] C:128
$
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:53:27] C:130
$ git push origin master
Username for 'https://github.com': pathscientist
Password for 'https://pathscientist@github.com':
Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (10/10), 1.09 KiB | 223.00 KiB/s, done.
Total 10 (delta 0), reused 0 (delta 0)
remote: This repository moved. Please use the new location:
remote: https://github.com/pathscientist/mynewrepo.git
To https://github.com/pathscientist/git-test.git
* [new branch] master -> master
# hanchochang @ ubuntu in ~/mynewrepo on git:master x [20:58:14]
$ cd
# hanchochang @ ubuntu in ~ [20:58:28]
$ cat git_tokens
cat: git_tokens: No such file or directory
# hanchochang @ ubuntu in ~ [20:58:58] C:1
$ touch git_tokens
# hanchochang @ ubuntu in ~ [20:59:48]
$ echo "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" > git_tokens
# hanchochang @ ubuntu in ~ [21:00:02]
$ ll
total 514M
-rw-rw-r-- 1 hanchochang hanchochang 104 Oct 23 11:51 1
drwxr-xr-x 6 hanchochang hanchochang 4.0K Apr 12 2020 bioinf
drwxrwxr-x 3 hanchochang hanchochang 4.0K Oct 23 17:47 Bioinformatics-Resources
-rw-r--r-- 1 hanchochang hanchochang 30M Oct 24 2018 chr22_with_ERCC92.gtf
drwxr-xr-x 2 hanchochang hanchochang 4.0K Feb 16 2020 Desktop
drwxr-xr-x 2 hanchochang hanchochang 4.0K Feb 16 2020 Documents
drwxr-xr-x 4 hanchochang hanchochang 4.0K Feb 16 2020 Downloads
-rw-r--r-- 1 hanchochang hanchochang 8.8K Feb 16 2020 examples.desktop
-rw-r--r-- 1 hanchochang hanchochang 15K Jun 16 02:32 get-docker.sh
-rw-rw-r-- 1 hanchochang hanchochang 41 Oct 23 21:00 git_tokens
drwxr-xr-x 20 hanchochang hanchochang 4.0K Jul 15 19:47 miniconda3
drwxr-xr-x 2 hanchochang hanchochang 4.0K Feb 16 2020 Music
drwxrwxr-x 4 hanchochang hanchochang 4.0K Oct 23 19:58 mynewrepo
drwxr-xr-x 2 hanchochang hanchochang 4.0K Feb 16 2020 Pictures
drwxr-xr-x 3 hanchochang hanchochang 4.0K Apr 11 2020 project
drwxr-xr-x 2 hanchochang hanchochang 4.0K Feb 16 2020 Public
drwxr-xr-x 9 hanchochang hanchochang 4.0K Oct 23 17:50 share
-rw-r--r-- 1 hanchochang hanchochang 11 Apr 11 2020 srr
-rw-r--r-- 1 hanchochang hanchochang 108M Apr 11 2020 SRR6213653_1.fastq.gz.partial
-rw-r--r-- 1 hanchochang hanchochang 377M Apr 11 2020 SRR949627_1.fastq.gz.partial
drwxr-xr-x 2 hanchochang hanchochang 4.0K Feb 16 2020 Templates
-rw-rw-r-- 1 hanchochang hanchochang 323 Oct 23 11:52 temt.txt
-rwxr--r-- 1 hanchochang hanchochang 33 Jul 12 01:06 test2.sh
drwxr-xr-x 3 hanchochang hanchochang 4.0K Jun 30 02:23 tutorial
drwxr-xr-x 2 hanchochang hanchochang 4.0K Feb 16 2020 Videos