-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
101 lines (62 loc) · 1.98 KB
/
README
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
setup git repository for storing 'c' source code.
--------------------------------------------------
Main repository is stored on GitHub server: github.com
github login: j-angus
setup git:
------------
Global setup:
git config --global user.name "Jason Angus"
git config --global user.email jaduffa@gmail.com
git config --global color.ui true
Next steps:
mkdir ~/swdev
cd ~/swdev
Best to login to github first and check out help section there for clear instructions.
Follow setting up ssh key instructions first: http://help.github.com/linux-set-up-git/
change to ~/swdev on local computer.
git clone git@github.com:j-angus/cpama
creates directory: cpama
change to cpama
This is the directory for all cpama development.
Do some work.
add files to be tracked:
$ git add <path to files>
# Let's only store *.c source files and other informational text files. No compiled or object files for now.
save and commit changes to local git repository.
$ git commit
will commit all files added in the last step.
Or we can add and commit previously added files with:
$ git commit -am "commit comment"
push and merge changes to remote, github, repository.
to update on github:
$ git push -u origin master
When we want to get the latest revisions from github:
------------------------------------------------------
check to see if we are up to date or not:
$ git remote show origin
get changes from remote but don't merge:
$ git fetch
look at the differences after a fetch:
$ git diff
$ git show
if we're happy with changes, we can merge this way:
$ git merge origin/master
we can fetch and merge in one step with:
$ git pull origin
or even:
$ git pull
Recovering a deleted file (before committing):
-----------------------------------------------
git checkout HEAD -- <filename>
Some useful vim settings:
--------------------------
/* vim: tabstop=8:softtabstop=8:shiftwidth=8:noexpandtab:cindent:nu:sm:cursorline */
set
cindent
nu
sm
tabstop=8
softtabstop=8
shiftwidth=8
noexpandtab
cursorline