[Privoxy-commits] [privoxy] 01/02: developer-manual: Add git commands that should result in a merge-free history

User Git git at git.privoxy.org
Tue Dec 15 04:45:08 UTC 2020


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit c79d5a23e325b6408801445794b8ca5885105e65
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Dec 15 05:37:04 2020 +0100

    developer-manual: Add git commands that should result in a merge-free history
---
 doc/source/developer-manual.sgml | 50 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/doc/source/developer-manual.sgml b/doc/source/developer-manual.sgml
index 1ded9360..f384cbf2 100644
--- a/doc/source/developer-manual.sgml
+++ b/doc/source/developer-manual.sgml
@@ -192,6 +192,56 @@ Hal.
        Before pushing stuff, please rebase it on a current master so we get
        an uncomplicated commit history. Avoid merges where possible.
      </para>
+     <para>
+       Here's an example git sesssion that should result in a merge-free history:
+     </para>
+     <programlisting>
+fk at 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 at t520 ~/git/privoxy $git pull
+Already up to date.
+# Create a local banch for changes
+fk at t520 ~/git/privoxy $git checkout -b local-branch
+Switched to a new branch 'local-branch'
+# Create some change
+fk at t520 ~/git/privoxy $gmake dok dok-tidy
+[...]
+# Review your change
+fk at t520 ~/git/privoxy $git diff
+[...]
+# Commit your changes if they look goood
+fk at 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 at t520 ~/git/privoxy $git show
+[...]
+# Go to the master branch
+fk at 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 at t520 ~/git/privoxy $git pull
+[...]
+Already up to date.
+# Apply the commit you made to the local-branch
+fk at 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 at t520 ~/git/privoxy $git log -p
+# Finally push your change to the Privoxy repository
+fk at t520 ~/git/privoxy $git push
+[...]
+# Go back to the local branch
+fk at t520 ~/git/privoxy $git checkout local-branch
+# Rebase on top of master and continue hacking
+fk at t520 ~/git/privoxy $git rebase master
+Successfully rebased and updated refs/heads/local-branch.
+</programlisting>
      <!--
      <para>
        Branches are used to fork a sub-development path from the main trunk.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list