Update OpenBSD configure files.
[i18n-zh.git] / git.txt
blobe0c2ed24998ed03f010c3841145b9851f4bd3c1d
1 If you are commit to the i18n-zh project repository, please read this first.
3                 ============================================
4                     Guide to i18n-zh project repository
5                 ============================================
7 * Introduction
8 * Software version requirements
9 * Configuration
10 * Repository on repo.or.cz
11 * Repository maintenance
12 * Common git operation
13 * Getting the latest upstream code
14 * Using git-svn
15 * Diff & Patch
16 * File permission & encoding
17 * Verifying your po file
18 * Formating your po file
20 Introduction
21 ============
22 *) l10n
24 *) doc
26     1. Translation
28     2. Write document
30 *) i18n
33 Software version requirements
34 =============================
35 *) GNU gettext 0.16.1
36 *) Python 2.4.4
37 *) translate-toolkit(pomerge & pofilter) 1.0.1
40 Configuration
41 =============
42 The flowwing is the sample configuration, please modify some fields.
44 *) ~/.gitconfig
45     [color]
46         branch = auto
47         diff = auto
48         status = auto
50     [core]
51         compression = 9
53     [diff]
54         color = auto
56     [pack]
57         compression = 9
58         window = 128
59         depth = 64
61     [svn]
62         repack = 1000
63         repackflags = -a -d
65     [user]
66         # email = dongsheng.song@gmail.com
67         # name = Dongsheng Song
69 *) ~/.ssh/config
70     # Host repo.or.cz
71     #     HostName 152.69.94.80
72     #     Port 2222
73     #     User cauchy
76 Repository on repo.or.cz
77 ========================
78 *) gitweb
80     http://repo.or.cz/w/i18n-zh.git
82 *) clone
84     # cat .git/branches/origin
86     git://repo.or.cz/i18n-zh.git
88     http://repo.or.cz/r/i18n-zh.git
90     git+ssh://repo.or.cz/srv/git/i18n-zh.git
92 *) push
94     git+ssh://repo.or.cz/srv/git/i18n-zh.git
97 Repository maintenance
98 =====================
99 *) pack
101     git-repack -a -d -f --window=128 --depth=64
103 *) fsck
105     git-fsck --unreachable --strict HEAD $(cat .git/refs/heads/*)
106     git-prune
109 Common git operation
110 ====================
111 *) clone
112     git-clone git://repo.or.cz/i18n-zh.git
114     git-clone http://repo.or.cz/r/i18n-zh.git
116     git-clone git+ssh://repo.or.cz/srv/git/i18n-zh.git
118 *) update
120     git fetch && git rebase origin
122     DO NOT use "git-pull" simply", see section
123     "Getting the latest upstream code" for more details.
125 *) restore
126     git-checkout -f filename
128 *) commit
130     git-commit -a -m "your log messages"
132     if you commit patch by someone, use option "--author":
134     git-commit -a --author someone -m "your log messages"
136 *) reset
138     git reset --soft HEAD^
140 *) push
142     git-push git+ssh://repo.or.cz/srv/git/i18n-zh.git master:master
145 Getting the latest upstream code
146 ================================
147 There are two ways to update your local repository. Which one to use depends on
148 whether you have committed changes in the meantime.
150 *) No changes: pull
152     The command to update your local repository is:
154     git pull
156     It will pull down the latest repository information from the origin remote
157     file (which points at where you initially cloned the repository from), then
158     merge. If the new changes don't conflict with anything locally, the merge
159     will "fast-forward" your branch reference to the new head. If new changes
160     do conflict, it will try to do an automatic merge using a couple of
161     different schemes, and then automatically commits the merge if it's
162     satisfied. If you notice that your pull resulted in a merge (in the output
163     of pull), you might want to use gitk to see if the merge did what you
164     expected it to. If it isn't satisfied, then you have to resolve the
165     conflict manually.
167 *) You've made changes: fetch and rebase
169     If you have committed local changes, then git-pull will create a spurious
170     "Merge" commit, which will pollute the change list when you later push
171     upstream. To avoid this, do these two commands:
173     git fetch
174     git rebase origin
176     Instead of merging, this attempts to insert the changes you pull from the
177     origin repository before your local changes, avoiding the merge message.
180 Using git-svn
181 =============
182 *) Clone a repo (like git clone)
184     git-svn clone -T trunk -b branches -t tags \
185         https://i18n-zh.googlecode.com/svn/trunk
187 *) Reset your master to trunk (or any other branch)
189     git reset --hard remotes/trunk
191 *) Do some work and commit locally to git
193     git commit ...
195 *) Something is committed to SVN, rebase your local changes against the latest
196 changes in SVN
198     git-svn rebase
200 *) Now commit your changes (that were committed previously using git) to SVN,
201 as well as automatically updating your working HEAD:
203     git-svn dcommit
206 Diff & Patch
207 ============
208 *) diff
209     diff -wBNr -x .git . i18n-zh.origin
211 *) patch
212     patch -p0 < zh_CN.patch
215 File permission & encoding
216 ==========================
217 *) permission
219     set umask to 002, i.e.
221         set directory to 0775
222         set common file to 0664
223         set execute file to 0775
225 *) encoding
226     using utf-8 without signature(no BOM)
229 Verifying your po file
230 ======================
231 Please verify your po file is valid:
233     msgfmt --check-accelerators --statistics -c -o zh_CN.mo zh_CN.po
236 Formating your po file
237 ======================
238 Please format your translation before send po to the mailing list,
239 or commit to the repository.
241     msgmerge --no-wrap -F -o zh_CN-new.po zh_CN.po example.pot
242     mv -f zh_CN-new.po zh_CN.po
244 This can minimize the diff output, review your translation is easy.