From: Fabian Keil <fk@fabiankeil.de>
Date: Tue, 15 Dec 2020 04:38:08 +0000 (+0100)
Subject: developer-manual: Regenerate with git steps
X-Git-Tag: v_3_0_30~261
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/@default-cgi@/faq/static/user-manual/@default-cgi@send-stylesheet?a=commitdiff_plain;h=fde7768a571b5347f2c1f7dce663a6e53ff3b789;p=privoxy.git

developer-manual: Regenerate with git steps
---

diff --git a/doc/webserver/developer-manual/git.html b/doc/webserver/developer-manual/git.html
index 6e4e77a3..cd3c4a9f 100644
--- a/doc/webserver/developer-manual/git.html
+++ b/doc/webserver/developer-manual/git.html
@@ -50,6 +50,58 @@
       once such changes are fully tested ought they be pushed back to the central repository master branch.</p>
       <p>Before pushing stuff, please rebase it on a current master so we get an uncomplicated commit history. Avoid
       merges where possible.</p>
+      <p>Here's an example git sesssion that should result in a merge-free history:</p>
+      <table border="0" bgcolor="#E0E0E0" width="100%">
+        <tr>
+          <td>
+            <pre class="PROGRAMLISTING">fk@t520 ~/git/privoxy $git checkout master
+Switched to branch 'master'
+Your branch is up to date with 'origin/master'.
+# Make sure you have the latest changes
+fk@t520 ~/git/privoxy $git pull
+Already up to date.
+# Create a local banch for changes
+fk@t520 ~/git/privoxy $git checkout -b local-branch
+Switched to a new branch 'local-branch'
+# Create some change
+fk@t520 ~/git/privoxy $gmake dok dok-tidy
+[...]
+# Review your change
+fk@t520 ~/git/privoxy $git diff
+[...]
+# Commit your changes if they look goood
+fk@t520 ~/git/privoxy $git commit -m "developer-manual: Regenerate" doc/webserver/
+[local-branch 1abb7316] developer-manual: Regenerate
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+# Review your commit
+fk@t520 ~/git/privoxy $git show
+[...]
+# Go to the master branch
+fk@t520 ~/git/privoxy $git checkout master
+Switched to branch 'master'
+Your branch is up to date with 'origin/master'.
+# Make sure you are still in sync
+fk@t520 ~/git/privoxy $git pull
+[...]
+Already up to date.
+# Apply the commit you made to the local-branch
+fk@t520 ~/git/privoxy $git cherry-pick local-branch
+[master 046e85e2] developer-manual: Regenerate
+ Date: Tue Dec 15 05:10:07 2020 +0100
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+# Make sure the history looks as expected
+fk@t520 ~/git/privoxy $git log -p
+# Finally push your change to the Privoxy repository
+fk@t520 ~/git/privoxy $git push
+[...]
+# Go back to the local branch
+fk@t520 ~/git/privoxy $git checkout local-branch
+# Rebase on top of master and continue hacking
+fk@t520 ~/git/privoxy $git rebase master
+Successfully rebased and updated refs/heads/local-branch.</pre>
+          </td>
+        </tr>
+      </table>
       <p>At one time there were two distinct branches: stable and unstable. The more drastic changes were to be in the
       unstable branch. These branches have now been merged to minimize time and effort of maintaining two branches.</p>
     </div>