-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsubmit_update
More file actions
58 lines (49 loc) · 1.48 KB
/
submit_update
File metadata and controls
58 lines (49 loc) · 1.48 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
### submit local code
mkdir network
git clone git@github.com:ShenLab/network.git
git status
git add *R
git commit -a -m “init"
## git commit single file
git commit -m 'my notes' path/to/my/file.ext
git push origin master
### multiple users
git clone git@qiang:gitQiang/MICRF.git
cd MICRF
cp ../test.m ./
git add test.m
git status
git commit -a -m "init"
git push git@qiang:gitQiang/MICRF.git master
### update local code to github
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
git pull
git add your_file
git commit -m “comment"
git push -u origin master
## remove or change folder of github code
ref 1: http://stackoverflow.com/questions/1983346/deleting-files-using-git-github
git add . -A
git commit -m "removed some files"
## git submit to Shenlab repository
mkdir network
git clone git@github.com:ShenLab/network.git
cd network
git status
git add *R
git commit -a -m “init"
git push origin master
## git delete files:!!! deletes it from the local file system.
git rm file1.txt
git commit -m "remove file1.txt"
# only remove from repo
git rm --cached file.txt
# ref: http://stackoverflow.com/questions/2047465/how-can-i-delete-a-file-from-git-repo
## git add new branches
git checkout -b [new_branch_name]
git branch
# switch branches
git checkout [branch_name]
ref1: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/
ref2: https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches