Advanced usage of git for Worg

Table of Contents

{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 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 git format-patch or send them directly with 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 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:

	to = bzg AT gnu DOT org

(Replace AT and DOT by the @ and .)

Then the git send-email command will send the patches directly to Bastien.

Use git send-email like this:

~$ git send-email --annotate -3

to review and annotate the last three commits in the current branch before sending them.

Documentation from the website (either in its HTML format or in its Org format) is licensed under the GNU Free Documentation License version 1.3 or later. The code examples and css stylesheets are licensed under the GNU General Public License v3 or later.