1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 >The Git Repository</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10 TITLE="Privoxy Developer Manual"
11 HREF="index.html"><LINK
14 HREF="introduction.html"><LINK
16 TITLE="Documentation Guidelines"
17 HREF="documentation.html"><LINK
20 HREF="../p_doc.css"><META
21 HTTP-EQUIV="Content-Type"
23 charset=ISO-8859-1"></HEAD
34 SUMMARY="Header navigation table"
43 >Privoxy Developer Manual</TH
51 HREF="introduction.html"
65 HREF="documentation.html"
80 >2. The Git Repository</A
83 > If you become part of the active development team, you will eventually
84 need write access to our holy grail, the Git repository. One of the
85 team members will need to set this up for you. Please read
86 this chapter completely before accessing via Git.
94 >2.1. Access to Git</A
97 > The project's Git repository is hosted on the
99 HREF="https://www.privoxy.org/"
101 >Privoxy webserver</A
103 For Privoxy team members with push privileges the Git repository URL is
106 >ssh://git@git.privoxy.org:23/git/privoxy.git</TT
110 > Contributors without push privileges can
113 >"git clone https://www.privoxy.org/git/privoxy.git"</SPAN
117 > The central repository is called <TT
121 source branch is called <TT
125 within the project for target-dependent build and packaging tools, each
126 including the name of the target operating system in their name (e.g.
127 Windows, OSXPackageBuilder, debian). There is a webview of the Git
130 HREF="https://www.privoxy.org/gitweb/?p=privoxy.git;a=tree"
132 > https://www.privoxy.org/gitweb/?p=privoxy.git;a=tree</A
134 which might help with visualizing how these pieces fit together.
146 > Whilst the central repository contains only the master branch, developers
147 are of course free to create branches in their local repositories as they
148 develop features, fixes, or update the target-dependent tools. Only once
149 such changes are fully tested ought they be pushed back to the central
150 repository master branch.
153 > Before pushing stuff, please rebase it on a current master so we get
154 an uncomplicated commit history. Avoid merges where possible.
157 > Here's an example git sesssion that should result in a merge-free history:
166 CLASS="PROGRAMLISTING"
167 > fk@t520 ~/git/privoxy $git checkout master
168 Switched to branch 'master'
169 Your branch is up to date with 'origin/master'.
170 # Make sure you have the latest changes
171 fk@t520 ~/git/privoxy $git pull
173 # Create a local banch for changes
174 fk@t520 ~/git/privoxy $git checkout -b local-branch
175 Switched to a new branch 'local-branch'
177 fk@t520 ~/git/privoxy $gmake dok dok-tidy
180 fk@t520 ~/git/privoxy $git diff
182 # Commit your changes if they look goood
183 fk@t520 ~/git/privoxy $git commit -m "developer-manual: Regenerate" doc/webserver/
184 [local-branch 1abb7316] developer-manual: Regenerate
185 1 file changed, 2 insertions(+), 2 deletions(-)
187 fk@t520 ~/git/privoxy $git show
189 # Go to the master branch
190 fk@t520 ~/git/privoxy $git checkout master
191 Switched to branch 'master'
192 Your branch is up to date with 'origin/master'.
193 # Make sure you are still in sync
194 fk@t520 ~/git/privoxy $git pull
197 # Apply the commit you made to the local-branch
198 fk@t520 ~/git/privoxy $git cherry-pick local-branch
199 [master 046e85e2] developer-manual: Regenerate
200 Date: Tue Dec 15 05:10:07 2020 +0100
201 1 file changed, 2 insertions(+), 2 deletions(-)
202 # Make sure the history looks as expected
203 fk@t520 ~/git/privoxy $git log -p
204 # Finally push your change to the Privoxy repository
205 fk@t520 ~/git/privoxy $git push
207 # Go back to the local branch
208 fk@t520 ~/git/privoxy $git checkout local-branch
209 # Rebase on top of master and continue hacking
210 fk@t520 ~/git/privoxy $git rebase master
211 Successfully rebased and updated refs/heads/local-branch.</PRE
216 > At one time there were two distinct branches: stable and unstable. The
217 more drastic changes were to be in the unstable branch. These branches
218 have now been merged to minimize time and effort of maintaining two
228 >2.3. Git Commit Guidelines</A
231 > The source tree is the heart of every software project. Every effort must
232 be made to ensure that it is readable, compilable and consistent at all
233 times. We expect anyone with Git access to strictly
234 adhere to the following guidelines:
237 > Basic Guidelines, for all branches:
244 > Please don't commit even
245 a small change without testing it thoroughly first. When we're
246 close to a public release, ask a fellow developer to review your
252 > Your commit message should give a concise overview of <SPAN
259 > (no big details) and <SPAN
263 >why you changed it</I
266 Just check previous messages for good examples.
271 > Don't use the same message on multiple files, unless it equally applies to
277 > If your changes span multiple files, and the code won't recompile unless
278 all changes are committed (e.g. when changing the signature of a function),
279 then commit all files one after another, without long delays in between.
280 If necessary, prepare the commit messages in advance.
285 > Before changing things on Git, make sure that your changes are in line
286 with the team's general consensus on what should be done.
291 > Note that near a major public release, we get more cautious.
292 There is always the possibility to submit a patch to the <A
293 HREF="https://sourceforge.net/p/ijbswa/patches/"
298 HREF="https://lists.privoxy.org/mailman/listinfo/privoxy-devel"
300 >privoxy-devel mailing list</A
313 SUMMARY="Footer navigation table"
324 HREF="introduction.html"
342 HREF="documentation.html"
362 >Documentation Guidelines</TD