forked from domeo/DomeoClient
-
Notifications
You must be signed in to change notification settings - Fork 2
/
git-helps.txt
58 lines (31 loc) · 1.01 KB
/
git-helps.txt
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
statGit workflow:
1) clone a fork that I have read/write permissions on
git clone http://...
2) add a file to the local clone that git will track changes on
git add <file/folder>
3) code and then commit to the local branch
git commit -m"informative message"
4) determine remote and local branch names
git remote
git branch
5) what's changed?
git status
6) push local changes to the remote
git push origin master
7) pull remote changes to the local
git fetch origin
git checkout master
git pull
(see https://help.github.com/articles/syncing-a-fork)
8) whats the state of the local branches?
git branch -va
9) Get in sync with the original fork
If 'git remote -v' does now show https://github.com/domeo/DomeoClient.git as upstream:
$ git remote add upstream https://github.com/domeo/DomeoClient.git
Otherwise:
git fetch upstream
git branch -va
git checkout master
git merge upstream/master
10) mark local changes so that they are not committed to the remote
git update-index --assume-unchanged <file or folder>