-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux_cmd.html
63 lines (51 loc) · 1.95 KB
/
linux_cmd.html
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
</body>
<h1>Linux command lines</h1>
<h2>Basic</h2>
<li><a href="/ls.html">ls</a> --- List down the files and sub-directories within your current directory</li>
<li>cd --- Change Directory -- Change the current working directory #Hint: when you enter 'Desktop', only enter 'Des' then click 'TAB'botton, it will fill up the directory.</li>
<li>pwd --- print work directory</li>
<li>clear --- Clear everything in the window</li>
'''
https://blog.csdn.net/ancientear/article/details/81054986
https://www.javatpoint.com/linux-tutorial
'''
<hr />
<h2>SSH</h2>
<h2>GIT PUSH</h2>
<h3>Git global setup</h3>
<li>git config --global user.name "Ye Tao"</li>
<li>git config --global user.email "[email protected]"</li>
<h3>Create a new repository</h3>
<li>git clone [email protected]:1dv501/student/yt222ar/assignment-03.git</li>
<li>cd assignment-03</li>
<li>git switch -c main</li>
<li>touch README.md</li>
<li>git add README.md</li>
<li>git commit -m "add README"</li>
<li>git push -u origin main</li>
<h3>Push an existing folder</h3>
<li>cd existing_folder</li>
<li>git init --initial-branch=main</li>
<li>git remote add origin [email protected]:1dv501/student/yt222ar/assignment-03.git</li>
<li>git add .</li>
<li>git commit -m "Initial commit"</li>
<li>git push -u origin main</li>
<h3>Push an existing Git repository</h3>
<li>cd existing_repo</li>
<li>git remote rename origin old-origin</li>
<li>git remote add origin [email protected]:1dv501/student/yt222ar/assignment-03.git</li>
<li>git push -u origin --all</li>
<li>git push -u origin --tags</li>
<h2>Other</h2>
<li>cd .shh</li>
<li>chmod u+xr,go-rwx ~/.ssh --- if "Permission denied" on a directory... # <a href="https://unix.stackexchange.com/questions/146193/bash-cd-ssh-permission-denied">-bash: cd: .ssh/: Permission denied</a></li>
<li>git rm XXX.XXX</li>
<li>git commit -m "xxxxxx"</li>
<li>git push</li>
<li>git push -u origin main -f</li>
<li>git status</li>
</body>
<br />
<body>
<a href="/index.html">Home</a>
</body>