]> sipb.mit.edu Git - ikiwiki.git/blob - doc/rcs/gitmanual.mdwn
web commit by http://natalian.org/
[ikiwiki.git] / doc / rcs / gitmanual.mdwn
1 Main use case I am trying to accomplish: Edit wiki pages offline.
2
3 1. Imagine you're the administrator of the site and you want to checkout the wiki sources to give them some love while on a train journey.
4 2. Or you are writing a complex document and you want to simply use your favourite $EDITOR
5 3. Learn a little more about [git](http://git.or.cz/)
6
7 # Workflow
8
9 ## on webconverger.org/si.dabase.com/hendry
10
11 Wiki page created with [ikiwiki](http://ikiwiki.info). Example usb.mdwn [usb](http://webconverger.org/usb/)
12
13 ## on monty (my laptop)
14
15 I wonder why a "pull" doesn't just init a repo like a "svn co" does?
16
17     monty:~/git-testing% git-init
18     Initialized empty Git repository in .git/
19
20     monty:~/git-testing% git-pull ssh://si.dabase.com/home/hendry/wikiwc/.git/
21     warning: no common commits
22     remote: Generating pack...
23     remote: Done counting 746 objects.
24     remote: Deltifying 746 objects...
25     remote:  100% (746/746) done
26     Indexing 746 objects...
27     remote: Total 746 (delta 443), reused 723 (delta 431)
28      100% (746/746) done
29     Resolving 443 deltas...
30      100% (443/443) done
31
32     echo "blah" >> usb.mdwn
33     monty:~/git-testing% git-commit -a -m "added test"
34     Created commit d3507df: added test
35      1 files changed, 1 insertions(+), 0 deletions(-)
36
37     monty:~/git-testing% git-push ssh://si.dabase.com/home/hendry/wikiwc/.git/
38     updating 'refs/heads/master'
39       from 75a4a8e94e5fff2a4beced1574e772742d3f9847
40       to   d3507dfe19b469e61a728d1b0a833a5f480f5802
41     Generating pack...
42     Done counting 5 objects.
43     Result has 3 objects.
44     Deltifying 3 objects...
45      100% (3/3) done
46     Writing 3 objects...
47      100% (3/3) done
48     Total 3 (delta 2), reused 0 (delta 0)
49     refs/heads/master: 75a4a8e94e5fff2a4beced1574e772742d3f9847 -> d3507dfe19b469e61a728d1b0a833a5f480f5802
50
51
52 ## on webconverger.org/si.dabase.com/hendry
53
54     hendry:239$ git-status 
55     # On branch master
56     # Changes to be committed:
57     #   (use "git reset HEAD <file>..." to unstage)
58     #
59     #       modified:   usb.mdwn
60     #
61     # Untracked files:
62     #   (use "git add <file>..." to include in what will be committed)
63     #
64     #       .ikiwiki/
65
66 Great, we see the usb.mdwn file has been modified. Now we need to check it out to update the local work tree (and the wiki?)
67
68     hendry:242$ git-checkout master usb.mdwn
69
70
71 # Stuff I am confused about
72
73 * this master/origin stuff
74 * why do I have to explicitly say the filename "usb.mdwn" for it to be updated?
75
76 # Ack
77
78 Thanks to gitte on #git on Freenode