-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
61 lines (40 loc) · 1.36 KB
/
notes.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
58
59
60
Git is distributed version control
* not SVN. No dIffs are stored.
* Instead every file and tree are hashed and the SHA 1 are stored. Tis makes it fast and efficient
* Blh blah blah - only the nerds care about this
Practical example
Take Joel's zip file.
Unzip it
Cd to directory
Git init <= this will get the directory ready to be tracked.
The normal workflow
Git add file file file
Git status
Git diff --cached
Git commit (-m if you are lazy)
Change files
Git status
Git add
Git commit
Now imagine I wandered to share this with Joel. This would allow him to do the amazingly things that he does. We are going to use github as out public repo. This will be visible to anyone who want to see / use it
***** create repo in github. Follow directions
Push changes
Imgine now that I am on Joel's machine.
Git clone
Have all the file stat I need
Add some stuff. Change it. Update repo. No more file shares!!!
Git pull
Git push
Git log
Intermediate commands
Git branch test
Gt branch
Git checkout test
**** also check how to checkout from remote and create branch
Do stuff
Git commit -am
Git checkout master
Git merge test
Git branch -d test
git checkout -b new_test
git push -u origin new_test