Difference between revisions of "FR:TheMagPiGit"
(→Configuration de l'accès) |
|||
Line 5: | Line 5: | ||
== Configuration de l'accès == | == Configuration de l'accès == | ||
− | * | + | * La première étape consiste à créer un compte [https://github.com/ github]. Ensuite, pour ceux de l'équipe de mise en page du MagPi, envoyez un courriel à l'éditeur pour obtenir la permission de rejoindre l'organisation github. |
− | |||
− | |||
+ | * Comme le Raspberry Pi ne dispose pas d'une grande puissance processeur, il est préférable d'utiliser les outils en ligne de commande pour accéder à github. Des outils avec interface graphique pour OSX et Windows sont disponibles en téléchargement sur le site de github. | ||
== Outils pour LINUX et OSX == | == Outils pour LINUX et OSX == |
Revision as of 01:58, 11 May 2013
Accueil | Lecteurs | Rédacteurs | Bénévoles | Partenaires | Publicité | Traductions |
- Guide de démarrage rapide - Un guide de démarrage rapide pour aider les nouveaux bénévoles à obtenir l'information dont ils ont besoin.
- Information pour les bénévoles - Un guide pour aider les bénévoles à se familiariser eux-mêmes avec le flux de travaux/outils de l'équipe.
- Information pour les rédacteurs - le processus pour soumettre un article.
- MMS MagPi - comment utiliser le MMS MagPi.
- GIT MagPi - comment utiliser les scripts GIT MagPi.
- Mise en page & polices - description de la mise en page standard et des polices associées.
- Création PDF - instructions pour la génération de PDF pour les publications électronique et papier.
Contents
Configuration de l'accès
- La première étape consiste à créer un compte github. Ensuite, pour ceux de l'équipe de mise en page du MagPi, envoyez un courriel à l'éditeur pour obtenir la permission de rejoindre l'organisation github.
- Comme le Raspberry Pi ne dispose pas d'une grande puissance processeur, il est préférable d'utiliser les outils en ligne de commande pour accéder à github. Des outils avec interface graphique pour OSX et Windows sont disponibles en téléchargement sur le site de github.
Outils pour LINUX et OSX
Several people would rather not read the git book. Therefore, some scripts were written to simplify the usage slightly. Git is not a replacement for good communication. Remember to update the local git repository before starting work on something and commit changes back to the repository frequently.
- Download mp-git-20130321.tar.gz from the DropBox.
- Unpack it,
tar xvfz mp-git-20130321.tar.gz
- Install it,
cd mp-git source install.sh
- Then use the commands as needed. The commands are,
mp-git-setup.sh
Type
mp-git-setup.sh
to install and configure git. The script has no action if the installation and configuration is already okay.
mp-git-clone.sh
The script expects that the repositories will be in a parent directory called magpi-git. (This can be overridden by setting the environmental variable MP_GIT_DIR to the full path of the parent directory.) If the magpi-git directory does not already exist,
mkdir magpi-git; cd magpi-git
Then type
mp-git-clone.sh 11
to clone the issue 11 repository. The script will not clone the repository again if a local copy already exists in the present working directory. More than one repository can be requested at once. For example,
mp-git-clone.sh 11 12 13 templates
will check out the issue 11, 12 and 13 repositories, as well as the templates repository.
mp-git-commit.sh
Type
mp-git-commit.sh 'A message goes here' [all]
where the string 'A message goes here' should be replaced with a sensible and informative message and the text 'all' is optional. If all is used, all repositories within the mp-git/ parent directory are checked. The script adds any new few files, commits to the local repository, fetches and remote changes and then merges the local changes into the remote repository. (Git does not allow empty directories to be added)
mp-git-update.sh
Type
mp-git-update.sh [all]
to update the local copy with any changes from the github repository, where 'all' is optional. If all is used, all repositories within the mp-git/ parent directory are checked.
Utilisation d'un serveur mandataire
If you need to use a proxy:
HTTP_PROXY="http://username:pwd@theproxyserver.com:port/" git config --global http.proxy $HTTP_PROXY
Tagging
While git tagging is not currently scripted, the git commands can be used to tag and push the tag back to the repository. There purpose of tagging is to keep track of a version of many files at one point in time. A good application would be to tag the repository once at the time of electronic publication and then once when printing. Then one could refer to the printed version just by a tag, rather than risk some additional changes to the repository being included.
The list of tags can be viewed by typing
git tag
from within a mp-git/*/ directory.
A new tag can be added by
git tag -a magpi-templates-00-00-01 -m 'Tagging before overwriting current templates with templates which contain document bleeds'
and all tags can be pushed back to the repository
git push --tags
Tags are not pushed to the remote repository when mp-git-commit.sh is run, since the --tags flag is not included in the git push command inside that script.