forked from shebytesit/medicord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GIT RULES
68 lines (35 loc) · 1.29 KB
/
GIT RULES
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
To get the repository for the first time (clone it from the web to local...)
git clone [email protected]:galarnyk/cs408.git
To check status of your LOCAL repository:
git status
ALWAYS PULL before you COMMIT or PUSH
If your git status shows an "untracked" file:
git add file
Then git status will show "new file" which means it was added
To pull the latest project from GITHUB:
git pull
To commit your changes (such as after an add, and after checking that you have the latest version with git pull):
git commit
THEN PUSH YOUR CHANGE TO GITHUB:
git push
_____________________________
NEW! (added on 9/23/2013 by galarnyk)
To switch to Blackbox branch on terminal::
First allow git to track new branch
git checkout Blackbox
To view branches (* signifies current branch you're on)
git branch
To switch back to the master branch (the one we're not breaking)
git checkout master
EXAMPLE:
[email protected]:~/cs408
:) 514:14 git checkout Blackbox
Branch Blackbox set up to track remote branch Blackbox from origin.
Switched to a new branch 'Blackbox'
[email protected]:~/cs408
:) 515:15 git branch
* Blackbox
master
[email protected]:~/cs408
:) 516:16 git checkout master
Switched to branch 'master'