-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitCS.txt
More file actions
25 lines (22 loc) · 1.07 KB
/
Copy pathgitCS.txt
File metadata and controls
25 lines (22 loc) · 1.07 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
Git Cheat Sheet
repo = repository
Create & Clone
(O)
create new repo | git init
clone local repo | git clone /path/to/repository
clone remote repo | git clone username@host:/path/to/repo
(O)
Add & Remove
add change to INDEX | git add <filename>
add all changes to INDEX | git add *
remove/delete | git rm <filename>
Commit & Synchronize
(0)
commit changes | git commit -m "Commit message"
push changes to remote repo | git push origin master
connect local repo to remote repo | git remote add origin <server>
update local repo with remote changes | git pull
Branches
*
| \
create new branch | |