Contribute Translations

Getting Started

Download and install git. On Linux, apt-get install git. If you're new to git, read the git docs, and Pro git by Scott Chacon.

Ensure that your copy of git is configured with your real name and the e-mail address you wish to be associated with your contributions. This is required to correctly track authorship:

$ git config --global user.name "Your Name"
$ git config --global user.email your.name@example.com

Create a user profile at GitHub with your real name and the same email you used to configure your git.

Configure your Bash prompt if you are on Linux by copying this into your .bashrc or .bash_profile.

The Pull Model

The home page for the Guide git has a button "Fork", which will fork the project into your own profile. Click it, and you get a fork of the project git. Now clone your forked git to your hard disk. Now work and commit your work as explained in Basic Techniques, and push your changed branches back to your fork.

When you're ready to send your work to the project owner, go to github.com and click the "pull request" button. Follow the instructions, and it should all be crystal clear.

Licensing

All code in the Guide is licensed under MIT/X11, meaning readers can reuse it freely. Any translations you contribute must follow the same license. The license is specified by LICENSE in the examples folder.

Basic Techniques

If you're new to git, especially if you come from SVN, you work by getting full copies of the repository on your local hard disk, and then exchanging sets of changes to and from other gits. It sounds complex, and sometimes is, but it works very well for large loose groups like ours.

A git is a set of 'branches', starting with the 'master' branch. Use 'git branch' to see what branches you have.

To get a git onto your hard disk: use the 'git clone' command:

git clone git://github.com/imatix/zguide.git

Behind a firewall you may need to use 'http:' instead of 'git:'.

Your clone has an origin, which is a 'remote' by that name. Use 'git remote -v' to see what remotes you have.

To make your changes: use your favorite tools to edit, compile, build, test. Do not allow your editor to reformat code you're not changing, or remove whitespaces elsewhere, this will make your patches useless.

To commit your work: use 'git add (files)' and 'git commit'. Use 'git commit —amend' to add to or fix up the previous commit.

The 'git commit' command opens an editor for you to enter a commit message. Provide a 1-line summary, followed by a blank line, followed by a description of what you changed. The commit message becomes part of the permanent history of the project if your changes are accepted, so be clear and concise. And check your sleppling.

To abandon your changes: either wipe your directory and re-clone the project git, or use the 'git reset' command. All git commands have help ('git reset —help'), and extensive explanation online.