[or-cvs] [githax/master] Add two examples for preparing patches and pushing to public repositories.

Nick Mathewson nickm at seul.org
Fri May 8 16:25:34 UTC 2009


Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Wed, 6 May 2009 00:49:54 +0200
Subject: Add two examples for preparing patches and pushing to public repositories.
Commit: 8183ba0681e43422a06981b4ad6fcb44776d3ce2

---
 doc/Howto.txt |   42 ++++++++++++++++++++++++++++++++++++++----
 1 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/doc/Howto.txt b/doc/Howto.txt
index 04690f8..9f3f11d 100644
--- a/doc/Howto.txt
+++ b/doc/Howto.txt
@@ -192,6 +192,25 @@ in your index,
 If you want to generate a set of patches to mail to the maintainer,
 use 'git format-patch' instead of diff or log.
 
+In our example, if you want to create a patch containing all your commits
+to the ftp branch since it was branched from master, you can do
+
+----
+% git format-patch master
+----
+
+This operation will create a separate file for each commit you made in the
+ftp branch:
+
+0001-first-change.patch
+0002-second-change.patch
+...
+
+Mail these files to the project maintainer, maybe with a short idea what
+your bunch of patches is supposed to do, and the maintainer can apply them
+to the official repository.
+
+
 A NOTE ON COMMIT MESSAGES: Many Git tools (like the commit emails, and
 the shortlogs) will give better output if commit messages come in a
 special format.  The first line of the commit message should be a short
@@ -304,13 +323,28 @@ just do:
 And now you have a new Git repository that other people can fetch from
 git://git.torproject.org/~USERNAME/git/PROJECT
 
-For you, that's ssh://git.torproject.org/~USERNAME/git/PROJECT : you can
-follow the instructions at
+For you, that's ssh://git.torproject.org/~USERNAME/git/PROJECT .
 
-http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#pushing-changes-to-a-public-repository
+It's useful to add a remote as shortcut for your public repository:
 
-to push branches to your public repository.
+-----
+% git remote add public ssh://git.torproject.org/~USERNAME/git/PROJECT
+-----
+
+If you want to make your ftp branch available for others, you can push it
+to your public repository. If there is no ftp branch in your public
+repository yet, it will be created:
+
+-----
+% git checkout ftp
+% git push public ftp
+-----
+
+See the instructions at
+
+http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#pushing-changes-to-a-public-repository
 
+for more information on pushing branches to public repositories.
 
 If you don't have an account on Moria, see the rest of the documentation
 in that part of the Git manual.  Or go use github: it's pretty neat.
-- 
1.5.6.5




More information about the tor-commits mailing list