-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-commands.txt
More file actions
110 lines (86 loc) · 3.35 KB
/
git-commands.txt
File metadata and controls
110 lines (86 loc) · 3.35 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
HTTPS: https://github.com/chenweichen/Python-Socket-Practice.git
…or create a new repository on the command line
echo "# Python-Socket-Practice" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/chenweichen/Python-Socket-Practice.git
git push -u origin main
…or push an existing repository from the command line
git remote add origin https://github.com/chenweichen/Python-Socket-Practice.git
git branch -M main
git push -u origin main
pwd
path:
/d/vscPython/WebSocketProj
/* 初始化*/
git init
git status
git add built-in-socket
git status
git commit -m "Initial commit"
git status
git branch
/*要先至少有一個 commit 才能將原先 branch 改名*/
/* git branch -m <old branch name> <new branch name> */
git branch -m master websocket
git branch
/* 將遠端 respository 增加節點名字 */
/* git remote 跟遠端有關操作 */
/* add 加入一個遠端節點 */
/* main-websocket 是後面這串 github 伺服器的位置 */
git remote add main-websocket https://github.com/chenweichen/Python-Socket-Practice.git
/* 公司端 repository prefix is "office-" plus repository name */
git bracnh -m websocket office-websocket
/* 將本地端 repository 推上 遠端(github) repository */
/* 把 office-websocket 這分支內容推向 main-websocket */
/* 在 mian-websocket 那個遠端server(github)上 如果 office-websocket 不存在, 就建立一個叫做 office-websocket 的同名分支 */
/* 將 */
git push -u main-websocket office-websocket
#Enumerating objects: 5, done.
#Counting objects: 100% (5/5), done.
#Delta compression using up to 12 threads
#Compressing objects: 100% (4/4), done.
#Writing objects: 100% (5/5), 1.02 KiB | 347.00 KiB/s, done.
#Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
#To https://github.com/chenweichen/Python-Socket-Practice.git
# * [new branch] office-websocket -> office-websocket
#Branch 'office-websocket' set up to track remote branch 'office-websocket' from 'main-websocket'.
git branch
/* 在local 端新增一個分支-cat */
git branch cat
/* switch to bracnh cat */
git checkout cat
git status
git add git-commands.txt
git commit -m "Commit for records of git c"ommands"
/* 會把 branch cat 推到 main-websocket 這個節點表的位置, 並在上面建立一個同名 branch cat(或更新進度) */
git push main-websocket cat
#Enumerating objects: 4, done.
#Counting objects: 100% (4/4), done.
#Delta compression using up to 12 threads
#Compressing objects: 100% (3/3), done.
#Writing objects: 100% (3/3), 1.16 KiB | 596.00 KiB/s, done.
#Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
#remote:
#remote: Create a pull request for 'cat' on GitHub by visiting:
#remote: https://github.com/chenweichen/Python-Socket-Practice/pull/new/cat
#remote:
#To https://github.com/chenweichen/Python-Socket-Practice.git
# * [new branch] cat -> cat
git branch
git checkout office-websocket
/* office-websocket 合併分支 cat */
git merge cat
git push main-websocket office-websocket
git status
git add git-commdands.txt
git commit -m "After merging cat branch to office-websocket, I update some content to git-commands.txt"
git push main-websocket office-websocket
/* Add Bayesian useful links */
git status
git branch
git add bayesian-useful-links.txt
git commit -m "Add Bayesian useful links"
git push main-websocket office-websocket