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
|
First, you'll probably want to set something like these in your environment:
# Set some git environment variables
export GIT_AUTHOR_NAME='Robby Workman'
export GIT_COMMITTER_NAME='Robby Workman'
export GIT_COMMITTER_EMAIL="rworkman@slackware.com"
export GIT_AUTHOR_EMAIL="rworkman@slackware.com"
Making changes to the repo is easy. Open the file in your editor, make your
changes, and save them.
IMPORTANT: for the sake of easy log reading and (if needed) reverting of
changes, edit one file, commit that, and then move on. Try to avoid
commits that touch multiple files.
Once you've finished an edit, commit the changes:
git commit <filename>
This will prompt you for a commit message. Yes, I'm being picky about
this, but commit messages should have this format:
One line summary of the commit, not to exceed 68 characters
Notice the blank line above. These lines are optional, but
they should also wrap at 68 characters or less, so as to
make for "pretty" patchsets over email. Granted, I know
that won't be an issue for us, but let's create a good set
of habits, right? :)
Anyway, all indentation is preserved as is in the commit log,
so use it as desired. These lines, in case it's not clear,
should further explain the changes (if such explanation is
needed).
Now push your changes to the remote repo:
git push
You will probably need to add this to .git/config file inside the cloned repo:
[branch "master"]
remote = origin
merge = refs/heads/master
If you add a new file to the repo for whatever reason, then be sure to
add it to git's version control:
git add <newfile>
If you want to see the commit history, do "git log" -- that will pipe the
commit log into a pager.
If you want to see the diff between two commits, then do this:
git diff <shasum_of_first_commit> <shasum_of_other_commit>
|