Browse Source

Added worg-git-advanced.org.

Bastien Guerry 9 years ago
parent
commit
147df282ec
2 changed files with 94 additions and 3 deletions
  1. 90 0
      worg-git-advanced.org
  2. 4 3
      worg-git.org

+ 90 - 0
worg-git-advanced.org

@@ -0,0 +1,90 @@
+#+STARTUP:    align fold nodlcheck hidestars oddeven lognotestate
+#+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
+#+TITLE:      Advanced usage of git for Worg
+#+AUTHOR:     Worg people
+#+TAGS:       Write(w) Update(u) Fix(f) Check(c)
+#+EMAIL:      bzg AT altern DOT org
+#+LANGUAGE:   en
+#+PRIORITIES: A C B
+#+CATEGORY:   worg
+#+OPTIONS:    H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
+
+[[file:index.org][{Back to Worg's index}]]
+
+This page answer various questions on how to use git for editing Worg.
+
+If you're looking for a quick introduction on how to use git to
+contribute to Worg, please read [[file:worg-git.org][this page]] instead.
+
+* Shall I create a branch?
+
+Yes, it's cleaner.
+
+: ~$ git checkout -b t/my-topic-branch 
+: ~$ git commit -a -m "A line describing my change"
+
+From here, either you are a registered Worg contributor and want to
+merge the branch before pushing to Worg's repo, either you just want to
+send patches.
+
+If you want to merge the branch and push to Worg:
+
+: ~$ git checkout master
+: ~$ git merge t/my-topic-branch
+: ~$ git push
+
+If you just want to send patches, see below.
+
+When you're done with a branch, you can delete it with:
+
+: ~$ git branch -D t/my-topic-branch
+
+* I just want to send patches!
+
+It's okay.
+
+You can either either prepare patches with =[[http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html][git format-patch]]= or send
+them directly with =[[http://www.kernel.org/pub/software/scm/git/docs/git-send-email.html][git send-email]]=.
+
+** Use git format-patch
+
+We suppose you are in a branch called =t/my-topic-branch= and that you
+committed your changes.
+
+: ~$ git format-patch origin
+
+will create a separate mbox file for each commit, ready to be sent.
+
+: ~$ git format-patch -3
+
+will create three separate files for the last three commits you did in
+this branch.
+
+See the documentation of =[[http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html][git format-patch]]= to set the value of the
+various headers.
+
+** Use git send-email
+
+If your Worg repo is in =~/git/Worg= and if your emails are sent through
+the =sendmail= command, please add this to =~/git/Worg/.git/config=:
+
+: [sendemail]
+: 	to = bzg AT gnu DOT org
+
+(Replace =AT= and =DOT= by the =@= and =.=)
+
+Then the =git send-mail= command with send the patches directly to bzg
+(Bastien).
+
+Use =git send-mail= like this:
+
+: ~$ git send-mail --annotate -3
+
+to review and annotate the last three commits in the current branch
+before sending them.
+
+
+
+
+
+

+ 4 - 3
worg-git.org

@@ -51,8 +51,8 @@ If you want to contribute to Worg, keep reading.
 
 5. Clone the project somewhere in a working directory:
 
-   - If your user name in the shell is the same as the
-     =Login= [[http://repo.or.cz/reguser.cgi][registered at repo.or.cz]]:
+   - If your user name in the shell is the same as the =Login=
+     [[http://repo.or.cz/reguser.cgi][registered at repo.or.cz]]:
 
      : ~$ git clone git+ssh://repo.or.cz/srv/git/Worg.git
 
@@ -94,7 +94,8 @@ If you want to contribute to Worg, keep reading.
 
 2. Be sure to "pull" the last version of the repository.
 
-3. Make some changes.
+3. Make some changes.  (If you want to learn more about various git
+   workflow, read [[file:worg-git-advanced.org][this page]].)
 
 4. Commit your changes on your local repository: