From fcbcf60834c174541400d7d17acd2a9e226a66c9 Mon Sep 17 00:00:00 2001 From: Loic Kartono Date: Tue, 27 Jan 2015 20:11:35 +1100 Subject: [PATCH 1/6] Add french locale --- README.fr.md | 882 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 882 insertions(+) create mode 100644 README.fr.md diff --git a/README.fr.md b/README.fr.md new file mode 100644 index 0000000..2d8d881 --- /dev/null +++ b/README.fr.md @@ -0,0 +1,882 @@ +# GitHub Cheat Sheet +Une collection de cool fonctionnalités connu et moins connu pour Git et Github. Cette feuille de triche a été inspiré par le discours sur [Git and GitHub Secrets](http://www.confreaks.com/videos/1229-aloharuby2012-git-and-github-secrets) de [Zach Holman](https://github.com/holman) à la Aloha Ruby Conference 2012 ([diapositives](https://speakerdeck.com/holman/git-and-github-secrets)) et son discours [More Git and GitHub Secrets](https://vimeo.com/72955426) au WDCNZ 2013 ([diapositives](https://speakerdeck.com/holman/more-git-and-github-secrets)). + +*Shortlink: [`http://git.io/sheet`](http://git.io/sheet)* + +*Lire ceci dans une autre langue: [English](README.md), [한국어](README.ko.md), [日本語](README.ja.md), [简体中文](README.zh-cn.md), [Français](README.fr.md).* + +## Table des matières + - [GitHub](#github) + - [Ignorer les espaces](#ignore-whitespace) + - [Ajuster l'espace des tabulations](#adjust-tab-space) + - [Historique de Commit par auteur](#commit-history-by-author) + - [Cloner un dépôt](#cloning-a-repository) + - [Branche](#branch) + - [Comparer toutes les branches à une autre](#compare-all-branches-to-another-branch) + - [Comparer les branches](#comparing-branches) + - [Comparer les branches à travers des dépôts forkés](#compare-branches-across-forked-repositories) + - [Gists](#gists) + - [Git.io](#gitio) + - [Raccourcis clavier](#keyboard-shortcuts) + - [Mise en évidence de ligne dans les dépôts](#line-highlighting-in-repositories) + - [Fermer des issues via les messages de Commit](#closing-issues-via-commit-messages) + - [Cross-Link Issues](#cross-link-issues) + - [Verouillage de conversations](#locking-conversations) + - [Statut des CI dans les Pull Requests](#ci-status-on-pull-requests) + - [Coloration syntaxique dans les fichiers Markdown](#syntax-highlighting-in-markdown-files) + - [Emojis](#emojis) + - [Images/GIF](#imagesgifs) + - [L'intégration d'images dans le Wiki GitHub](#embedding-images-in-github-wiki) + - [Citation rapide](#quick-quoting) + - [Coller une image du Presse-papier dans les commentaires](#pasting-clipboard-image-to-comments) + - [Quick Licensing](#quick-licensing) + - [Listes de tâches](#task-lists) + - [Listes de tâches dans les documents Markdown](#task-lists-in-markdown-documents) + - [Liens relatifs](#relative-links) + - [Métadonnées et support de Plugin pour GitHub Pages](#metadata-and-plugin-support-for-github-pages) + - [Voir les métadonnées YAML dans vos documents](#viewing-yaml-metadata-in-your-documents) + - [Rendu de données tabulaires](#rendering-tabular-data) + - [Rétablir un pull request](#revert-a-pull-request) + - [Diffs](#diffs) + - [Rendered Prose Diffs](#rendered-prose-diffs) + - [Diffable Maps](#diffable-maps) + - [Expanding Context in Diffs](#expanding-context-in-diffs) + - [Diff or Patch of Pull Request](#diff-or-patch-of-pull-request) + - [Rendering and diffing images](#rendering-and-diffing-images) + - [Hub](#hub) + - [Lignes directrices pour la contribution](#contributing-guidelines) + - [Octicons](#octicons) + - [GitHub Resources](#github-resources) + - [GitHub Talks](#github-talks) + - [Git](#git) + - [Branche précédente](#previous-branch) + - [Stripspace](#stripspace) + - [Vérifier les Pull Requests](#checking-out-pull-requests) + - [Commits vides :trollface:](#empty-commits-trollface) + - [Styled Git Status](#styled-git-status) + - [Styled Git Log](#styled-git-log) + - [Git Query](#git-query) + - [Branches fusionnées](#merged-branches) + - [Fixup et Autosquash](#fixup-and-autosquash) + - [Serveur web pour parcourir les dépôts locaux](#web-server-for-browsing-local-repositories) + - [Configurations Git](#git-configurations) + - [Alias](#aliases) + - [Auto-Correct](#auto-correct) + - [Couleur](#color) + - [Ressources Git](#git-resources) + - [Livres Git](#git-books) + +## GitHub +### Ignorer les espaces +Ajouter `?w=1` à n'importe quelle URL d'un diff supprimera tous les changements lié à des espaces, vous permettant de voir seulement le code qui a changé. + +![Diff sans les espaces](https://camo.githubusercontent.com/797184940defadec00393e6559b835358a863eeb/68747470733a2f2f6769746875622d696d616765732e73332e616d617a6f6e6177732e636f6d2f626c6f672f323031312f736563726574732f776869746573706163652e706e67) + +[*En savoir plus sur les secrets de GitHub.*](https://github.com/blog/967-github-secrets) + +### Ajuster l'espace des tabulations +Ajouter `?ts=4` à l'URL d'un diff ou d'un fichier affichera les caractères de tabulation avec 4 grands espaces au lieu de 8 par défaut. Le nombre après `ts` peut être ajustée en fonction de votre préférence. Ceci ne fonctionne pas sur les Gists, ou sur l'affichage des fichiers en mode brute, mais une [extension Chrome](https://chrome.google.com/webstore/detail/github-tab-size/ofjbgncegkdemndciafljngjbdpfmbkn) peut automatiser cela. + +Voici un fichier source Go avant ajout du `?ts=4`: + +![Avant, exemple espace de tabulation](http://i.imgur.com/GIT1Fr0.png) + +...et le même fichier après ajout du `?ts=4`: + +![Après, exemple espace de tabulation](http://i.imgur.com/70FL4H9.png) + +### Historique de Commit par auteur +Pour voir tous les commits d'un dépôt par auteur, ajouter `?author=nom_utilisateur` à l'URL. + +``` +https://github.com/rails/rails/commits/master?author=dhh +``` + +![DHH commit history](http://i.imgur.com/S7AE29b.png) + +[*En savoir plus sur les différences entre les vues de commits.*](https://help.github.com/articles/differences-between-commit-views) + +### Cloner un dépôt +Lors du clone d'un dépôt, le `.git` peut être omis en fin d'URL. + +```bash +$ git clone https://github.com/tiimgreen/github-cheat-sheet +``` + +[*En savoir plus sur la commande `clone` de Git.*](http://git-scm.com/docs/git-clone) + +### Branche +#### Comparer toutes les branches à une autre + +Si vous vous rendez à la page des [Branches](https://github.com/tiimgreen/github-cheat-sheet/branches) du dépôt, à côté du bouton des Commits: + +``` +https://github.com/{user}/{repo}/branches +``` + +... vous verrez une liste de toutes les branches qui ne sont pas fusionnés avec la branche principale. + +De là, vous pouvez accéder à la page pour comparer ou supprimer une branche à l'aide d'un clic sur un bouton. + +![Compare branches not merged into master in rails/rails repo - https://github.com/rails/rails/branches](http://i.imgur.com/0FEe30z.png) + +#### Comparer les branches +Pour utiliser GitHub afin de comparer les branches, modifier l'URL pour que cette dernière ressemble à ceci: + +``` +https://github.com/{utilisateur}/{depot}/compare/{range} +``` + +où `{range} = master...4-1-stable` + +Par exemple: + +``` +https://github.com/rails/rails/compare/master...4-1-stable +``` + +![Rails branch compare example](http://i.imgur.com/tIRCOsK.png) + +`{range}` peut être modifié à l'aide d'expressions comme: + +``` +https://github.com/rails/rails/compare/master@{1.day.ago}...master +https://github.com/rails/rails/compare/master@{2014-10-04}...master +``` + +*Les dates sont au format `YYYY-DD-MM`* + +![Another compare example](http://i.imgur.com/5dtzESz.png) + +...ce qui vous permet de voir la différence entre la branche principale jusqu'à un certain temps ou à une date spécifique. + +[*En savoir plus sur la comparaison des commits dans le temps.*](https://help.github.com/articles/comparing-commits-across-time) + +#### Comparer les branches à travers des dépôts forkés +Pour utiliser GitHub afin de comparer les branches à travers des dépôts forkés, modifier l'URL pour que cette dernière ressemble à ceci: + +``` +https://github.com/{utilisateur}/{depot}/compare/{foreign-user}:{branch}...{own-branch} +``` + +Par exemple: + +``` +https://github.com/rails/rails/compare/byroot:master...master +``` + +![Forked branch compare](http://i.imgur.com/Q1W6qcB.png) + +### Gists +Les [Gists](https://gist.github.com/) sont un moyen facile de travailler avec des petits morceaux de code sans devoir créer un dépôt à part entière. + +![Gist](http://i.imgur.com/VkKI1LC.png?1) + +Ajouter `.pibb` à la fin de n'importe quelle URL Gist ([Comme ceci](https://gist.github.com/tiimgreen/10545817.pibb)) afin d'obtenir la version * uniquement HTML * adaptée pour l'intégration dans n'importe quel autre site. + +Les Gists peuvent être traités comme des dépôts. Ils peuvent donc être clonés comme ces derniers: + +```bash +$ git clone https://gist.github.com/tiimgreen/10545817 +``` + +![Gists](http://i.imgur.com/BcFzabp.png) + +Cela signifie que vous pouvez également modifier et pousser des mises à jour vers des Gists: + +```bash +$ git commit +$ Username for 'https://gist.github.com': +$ Password for 'https://tiimgreen@gist.github.com': +``` + +[*En savoir plus sur la création de gists.*](https://help.github.com/articles/creating-gists) + +### Git.io +[Git.io](http://git.io) est un raccourcisseur d'URL simple pour GitHub. + +![Git.io](http://i.imgur.com/6JUfbcG.png?1) + +Vous pouvez également l'utiliser en pure HTTP en utilisant Curl: + +```bash +$ curl -i http://git.io -F "url=https://github.com/..." +HTTP/1.1 201 Created +Location: http://git.io/abc123 + +$ curl -i http://git.io/abc123 +HTTP/1.1 302 Found +Location: https://github.com/... +``` + +[*En savoir plus sur Git.io.*](https://github.com/blog/985-git-io-github-url-shortener) + +### Raccourcis clavier +Sur la page d'un dépôt, les raccourcis clavier vous permettent de naviguer facilement. + + - Appuyer sur `t` fera apparaître un explorateur de fichier. + - Appuyer sur `w` fera apparaître le sélecteur de branche. + - Appuyer sur `s` sélectionnera la barre de commandes. + - Appuyer sur `l` va éditer les labels sur les issues existantes. + - Appuyer sur `y` **lorsque vous regardez un fichier** (e.g. `https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.md`) changera votre URL actuel vers une URL gêlant la page que vous êtes entrain de regarder. Si ce code change, vous serez toujours en mesure de voir ce que vous avez vu au moment de cette action. + +Pour voir tous les raccourcis pour la page courante, pressez `?`: + +![Keyboard shortcuts](http://i.imgur.com/y5ZfNEm.png) + +[*En savoir plus sur l'utilisation de la barre de commandes.*](https://help.github.com/articles/using-the-command-bar) + +### Mise en évidence de ligne dans les dépôts +En ajoutant `#L52` à la fin de l'URL d'un fichier de code ou en cliquant simplement le numéro de ligne mettra cette dernière en évidence. + +Cela fonctionne aussi avec les sélections multiples, ex. `#L53-L60`, pour effectuer une sélection multiple, maintenez `shift` et cliquez sur deux lignes: + +``` +https://github.com/rails/rails/blob/master/activemodel/lib/active_model.rb#L53-L60 +``` + +![Line Highlighting](http://i.imgur.com/8AhjrCz.png) + +### Fermer des issues via les messages de Commit +Si un commit particulier corrige une issue, l'utilisation des mots-clés `fix/fixes/fixed`, `close/closes/closed` ou `resolve/resolves/resolved`, suivi du numéro de l'issue, fermera l'issue une fois committé sur la branche principale. + +```bash +$ git commit -m "Fix screwup, fixes #12" +``` + +Cela ferme l'issue et fait référence au commit associé. + +![Closing Repo](http://i.imgur.com/Uh1gZdx.png) + +[*En savoir plus sur la fermeture des issues via les messages de Commit.*](https://help.github.com/articles/closing-issues-via-commit-messages) + +### Cross-Link Issues +Pour créer un lien vers une issue d'un même dépôt, taper simplement `#` puis le numéro de l'issue, elle sera auto-lié. + +Pour lier vers une issue d'un autre dépôt, `user_name/repo_name#ISSUE_NUMBER` ex. `tiimgreen/toc#12`. + +![Cross-Link Issues](https://camo.githubusercontent.com/447e39ab8d96b553cadc8d31799100190df230a8/68747470733a2f2f6769746875622d696d616765732e73332e616d617a6f6e6177732e636f6d2f626c6f672f323031312f736563726574732f7265666572656e6365732e706e67) + +### Locking Conversations +Pull Requests and Issues can now be locked by owners or collaborators of the repo. + +![Lock conversation](https://cloud.githubusercontent.com/assets/2723/3221693/bf54dd44-f00d-11e3-8eb6-bb51e825bc2c.png) + +This means that users who are not collaborators on the proejct will no longer be able to comment. + +![Comments locked](https://cloud.githubusercontent.com/assets/2723/3221775/d6e513b0-f00e-11e3-9721-2131cb37c906.png) + +[*Read more about locking conversations.*](https://github.com/blog/1847-locking-conversations) + + +### CI Status on Pull Requests +If set up correctly, every time you receive a Pull Request, [Travis CI](https://travis-ci.org/) will build that Pull Request just like it would every time you make a new commit. Read more about how to [get started with Travis CI](http://docs.travis-ci.com/user/getting-started/). + +[![Travis CI status](https://cloud.githubusercontent.com/assets/1687642/2700187/3a88838c-c410-11e3-9a46-e65e2a0458cd.png)](https://github.com/octokit/octokit.rb/pull/452) + +[*Read more about the commit status API.*](https://github.com/blog/1227-commit-status-api) + +### Syntax Highlighting in Markdown Files +For example, to syntax highlight Ruby code in your Markdown files write: + + ```ruby + require 'tabbit' + table = Tabbit.new('Name', 'Email') + table.add_row('Tim Green', 'tiimgreen@gmail.com') + puts table.to_s + ``` + +This will produce: + +```ruby +require 'tabbit' +table = Tabbit.new('Name', 'Email') +table.add_row('Tim Green', 'tiimgreen@gmail.com') +puts table.to_s +``` + +GitHub uses [Linguist](https://github.com/github/linguist) to perform language detection and syntax highlighting. You can find out which keywords are valid by perusing the [languages YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). + +[*Read more about GitHub Flavored Markdown.*](https://help.github.com/articles/github-flavored-markdown) + +### Emojis +Emojis can be added to Pull Requests, Issues, commit messages, etc. using `:name_of_emoji:` + +The full list of supported Emojis on GitHub can be found at [emoji-cheat-sheet.com](http://www.emoji-cheat-sheet.com/) or [scotch-io/All-Github-Emoji-Icons](https://github.com/scotch-io/All-Github-Emoji-Icons). + +The top 5 used Ejmojis on GitHub are: + +1. :shipit: - `:shipit:` +2. :sparkles: - `:sparkles:` +3. :-1: - `:-1:` +4. :+1: - `:+1:` +5. :clap: - `:clap:` + +### Images/GIFs +Images and GIFs can be added to comments, READMEs etc.: + +``` +![Alt Text](http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif) +``` + +Raw images from the repo can be used by calling them directly.: + +``` +![Alt Text](https://github.com/(user)/(repo)/raw/master/path/to/image.gif) +``` + +![Peter don't care](http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif) + +All images are cached on GitHub, so if your host goes down, the image will remain available. + +#### Embedding Images in GitHub Wiki +There are multiple ways of embedding images in Wiki pages. There's the standard Markdown syntax (shown above). But there's also a syntax that allows things like specifying the height or width of the image: + +```markdown +[[ http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif | height = 100px ]] +``` + +Which produces: + +![Just a screenshot](http://i.imgur.com/J5bMf7S.png) + +### Quick Quoting +When on a comment thread and you want to quote something someone previously said, highlight the text and press `r`, this will copy it into your text box in the block-quote format. + +![Quick Quote](https://f.cloud.github.com/assets/296432/124483/b0fa6204-6ef0-11e2-83c3-256c37fa7abc.gif) + +[*Read more about quick quoting.*](https://github.com/blog/1399-quick-quotes) + +### Pasting Clipboard Image to Comments +After taking a screenshot and adding it to the clipboard (mac: `cmd-ctrl-shift-4`), you can simply paste (`cmd-v / ctrl-v`) the image into the comment section and it will be auto-uploaded to github. + +![Pasting Clipboard Image to Comments](https://cloud.githubusercontent.com/assets/39191/5794265/39c9b65a-9f1b-11e4-9bc7-04e41f59ea5f.png) + +[*Read more about issue attachments.*](https://help.github.com/articles/issue-attachments) + +### Quick Licensing +When creating a repository, GitHub gives you the option of adding in a pre-made license: + +![License](http://i.imgur.com/Chqj4Fg.png) + +You can also add them to existing repositories by creating a new file through the web interface. When the name `LICENSE` is typed in you will get an option to use a template: + +![License](http://i.imgur.com/fTjQict.png) + +Also works for `.gitignore`. + +[*Read more about open source licensing.*](https://help.github.com/articles/open-source-licensing) + +### Task Lists +In Issues and Pull requests check boxes can be added with the following syntax (notice the space): + +``` +- [ ] Be awesome +- [ ] Prepare dinner + - [ ] Research recipe + - [ ] Buy ingredients + - [ ] Cook recipe +- [ ] Sleep +``` + +![Task List](http://i.imgur.com/jJBXhsY.png) + +When they are clicked, they will be updated in the pure Markdown: + +``` +- [x] Be awesome +- [ ] Prepare dinner + - [x] Research recipe + - [x] Buy ingredients + - [ ] Cook recipe +- [ ] Sleep +``` + +[*Read more about task lists.*](https://help.github.com/articles/writing-on-github#task-lists) + +#### Task Lists in Markdown Documents +In full Markdown documents **read-only** checklists can now be added using the following syntax: + +``` +- [ ] Mercury +- [x] Venus +- [x] Earth + - [x] Moon +- [x] Mars + - [ ] Deimos + - [ ] Phobos +``` + +- [ ] Mercury +- [x] Venus +- [x] Earth + - [x] Moon +- [x] Mars + - [ ] Deimos + - [ ] Phobos + +[*Read more about task lists in markdown documents.*](https://github.com/blog/1825-task-lists-in-all-markdown-documents) + +### Relative Links +Relative links are recommended in your Markdown files when linking to internal content. + +```markdown +[Link to a header](#awesome-section) +[Link to a file](docs/readme) +``` + +Absolute links have to be updated whenever the URL changes (e.g. repository renamed, username changed, project forked). Using relative links makes your documentation easily stand on its own. + +[*Read more about relative links.*](https://help.github.com/articles/relative-links-in-readmes) + +### Metadata and Plugin Support for GitHub Pages +Within Jekyll pages and posts, repository information is available within the `site.github` namespace, and can be displayed, for example, using `{{ site.github.project_title }}`. + +The Jemoji and jekyll-mentions plugins enable [emoji](#emojis) and [@mentions](https://github.com/blog/821) in your Jekyll posts and pages to work just like you'd expect when interacting with a repository on GitHub.com. + +[*Read more about repository metadata and plugin support for GitHub Pages.*](https://github.com/blog/1797-repository-metadata-and-plugin-support-for-github-pages) + +### Viewing YAML Metadata in your Documents +Many blogging websites, like [Jekyll](http://jekyllrb.com/) with [GitHub Pages](http://pages.github.com/), depend on some YAML-formatted metadata at the beginning of your post. GitHub will render this metadata as a horizontal table, for easier reading + +![YAML metadata](https://camo.githubusercontent.com/47245aa16728e242f74a9a324ce0d24c0b916075/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f36343035302f313232383236372f65303439643063362d323761302d313165332d396464382d6131636432323539393334342e706e67) + +[*Read more about viewing YAML metadata in your documents.*](https://github.com/blog/1647-viewing-yaml-metadata-in-your-documents) + +### Rendering Tabular Data +GitHub supports rendering tabular data in the form of `.csv` (comma-separated) and `.tsv` (tab-separated) files. + +![Tabular data](https://camo.githubusercontent.com/1b6dd0157ffb45d9939abf14233a0cb13b3b4dfe/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3238323735392f3937363436322f33323038336463652d303638642d313165332d393262322d3566323863313061353035392e706e67) + +[*Read more about rendering tabular data.*](https://github.com/blog/1601-see-your-csvs) + +###Revert a Pull Request +After a pull request is merged, you may find it does not help anything or it was a bad decision to merge the pull request. + +You can revert it by clicking the **Revert** button on the right side of a commit in the pull request page to create a pull request with reverted changes to this specific pull request. + +![Revert button](https://camo.githubusercontent.com/0d3350caf2bb1cba53123ffeafc00ca702b1b164/68747470733a2f2f6769746875622d696d616765732e73332e616d617a6f6e6177732e636f6d2f68656c702f70756c6c5f72657175657374732f7265766572742d70756c6c2d726571756573742d6c696e6b2e706e67) + +[*Read more about reverting pull requests*](https://github.com/blog/1857-introducing-the-revert-button) + +### Diffs +#### Rendered Prose Diffs +Commits and pull requests, including rendered documents supported by GitHub (e.g. Markdown), feature *source* and *rendered* views. + +![Source / Rendered view](https://github-images.s3.amazonaws.com/help/repository/rendered_prose_diff.png) + +Click the "rendered" button to see the changes as they'll appear in the rendered document. Rendered prose view is handy when you're adding, removing, and editing text: + +![Rendered Prose Diffs](https://f.cloud.github.com/assets/17715/2003056/3997edb4-862b-11e3-90be-5e9586edecd7.png) + +[*Read more about rendered prose diffs.*](https://github.com/blog/1784-rendered-prose-diffs) + +#### Diffable Maps +Any time you view a commit or pull request on GitHub that includes geodata, GitHub will render a visual representation of what was changed. + +[![Diffable Maps](https://f.cloud.github.com/assets/282759/2090660/63f2e45a-8e97-11e3-9d8b-d4c8078b004e.gif)](https://github.com/benbalter/congressional-districts/commit/2233c76ca5bb059582d796f053775d8859198ec5) + +[*Read more about diffable maps.*](https://github.com/blog/1772-diffable-more-customizable-maps) + +#### Expanding Context in Diffs +Using the *unfold* button in the gutter of a diff, you can reveal additional lines of context with a click. You can keep clicking *unfold* until you've revealed the whole file, and the feature is available anywhere GitHub renders diffs. + +![Expanding Context in Diffs](https://f.cloud.github.com/assets/22635/1610539/863c1f64-5584-11e3-82bf-151b406a272f.gif) + +[*Read more about expanding context in diffs.*](https://github.com/blog/1705-expanding-context-in-diffs) + +#### Diff or Patch of Pull Request +You can get the diff of a Pull Request by adding a `.diff` or `.patch` +extension to the end of the URL. For example: + +``` +https://github.com/tiimgreen/github-cheat-sheet/pull/15 +https://github.com/tiimgreen/github-cheat-sheet/pull/15.diff +https://github.com/tiimgreen/github-cheat-sheet/pull/15.patch +``` + +The `.diff` extension would give you this in plain text: + +``` +diff --git a/README.md b/README.md +index 88fcf69..8614873 100644 +--- a/README.md ++++ b/README.md +@@ -28,6 +28,7 @@ All the hidden and not hidden features of Git and GitHub. This cheat sheet was i + - [Merged Branches](#merged-branches) + - [Quick Licensing](#quick-licensing) + - [TODO Lists](#todo-lists) ++- [Relative Links](#relative-links) + - [.gitconfig Recommendations](#gitconfig-recommendations) + - [Aliases](#aliases) + - [Auto-correct](#auto-correct) +@@ -381,6 +382,19 @@ When they are clicked, they will be updated in the pure Markdown: + - [ ] Sleep + +(...) +``` + +#### Rendering and diffing images +GitHub can display several common image formats, including PNG, JPG, GIF, and PSD. In addition, there are several ways to compare differences between versions of those image formats. + +[![Diffable PSD](https://cloud.githubusercontent.com/assets/2546/3165594/55f2798a-eb56-11e3-92e7-b79ad791a697.gif)](https://github.com/blog/1845-psd-viewing-diffing) + +[*Read more about rendering and diffing images.*](https://help.github.com/articles/rendering-and-diffing-images) + +### Hub +[Hub](https://github.com/github/hub) is a command line Git wrapper that gives you extra features and commands that make working with GitHub easier. + +This allows you to do things like: + +```bash +$ hub clone tiimgreen/toc +``` + +[*Check out some more cool commands Hub has to offer.*](https://github.com/github/hub#commands) + +### Contributing Guidelines +Adding a `CONTRIBUTING` file to the root of your repository will add a link to your file when a contributor creates an Issue or opens a Pull Request. + +![Contributing Guidelines](https://camo.githubusercontent.com/71995d6b0e620a9ef1ded00a04498241c69dd1bf/68747470733a2f2f6769746875622d696d616765732e73332e616d617a6f6e6177732e636f6d2f736b697463682f6973737565732d32303132303931332d3136323533392e6a7067) + +[*Read more about contributing guidelines.*](https://github.com/blog/1184-contributing-guidelines) + +### Octicons +GitHubs icons (Octicons) have now been open sourced. + +![Octicons](https://og.github.com/octicons/octicons@1200x630.png) + +[*Read more about GitHub's Octicons*](https://octicons.github.com) + + +### GitHub Resources +| Title | Link | +| ----- | ---- | +| GitHub Explore | https://github.com/explore | +| GitHub Blog | https://github.com/blog | +| GitHub Help | https://help.github.com/ | +| GitHub Training | https://training.github.com/ | +| GitHub Developer | https://developer.github.com/ | + +#### GitHub Talks +| Title | Link | +| ----- | ---- | +| How GitHub Uses GitHub to Build GitHub | https://www.youtube.com/watch?v=qyz3jkOBbQY | +| Introduction to Git with Scott Chacon of GitHub | https://www.youtube.com/watch?v=ZDR433b0HJY | +| How GitHub No Longer Works | https://www.youtube.com/watch?v=gXD1ITW7iZI | +| Git and GitHub Secrets | https://www.youtube.com/watch?v=Foz9yvMkvlA | +| More Git and GitHub Secrets | https://www.youtube.com/watch?v=p50xsL-iVgU | + +## Git +### Previous Branch +To move to the previous branch in Git: + +```bash +$ git checkout - +# Switched to branch 'master' + +$ git checkout - +# Switched to branch 'next' + +$ git checkout - +# Switched to branch 'master' +``` + +[*Read more about Git branching.*](http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging) + +### Stripspace + +Git Stripspace: + +- Strips trailing whitespace +- Collapses newlines +- Adds newline to end of file + +A file must be passed when calling the command, e.g.: +```bash +$ git stripspace < README.md +``` + +[*Read more about the Git `stripspace` command.*](http://git-scm.com/docs/git-stripspace) + +### Checking out Pull Requests + +Pull Requests are special branches on the GitHub repository which can be retrieved locally in several ways: + +Retrieve a specific Pull Request and store it temporarily in `FETCH_HEAD` for quickly `diff`ing or `merge`ing: + +```bash +$ git fetch origin refs/pull/[PR-Number]/head +``` + +Acquire all Pull Request branches as local remote branches by refspec: + +```bash +$ git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*' +``` + +Or setup the remote to fetch Pull Requests automatically by adding these corresponding lines in your repository's `.git/config`: + +``` +[remote "origin"] + fetch = +refs/heads/*:refs/remotes/origin/* + url = git@github.com:tiimgreen/github-cheat-sheet.git +``` + +``` +[remote "origin"] + fetch = +refs/heads/*:refs/remotes/origin/* + url = git@github.com:tiimgreen/github-cheat-sheet.git + fetch = +refs/pull/*/head:refs/remotes/origin/pr/* +``` + +For Fork-based Pull Request contributions, it's useful to `checkout` a remote branch representing the Pull Request and create a local branch from it: + +```bash +$ git checkout pr/42 pr-42 +``` + +Or should you work on more repositories, you can globally configure fetching pull requests in the global git config instead. + +```bash +git config --global --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*" +``` + +This way, you can use the following short commands in all your repositories: + +```bash +git fetch origin +``` + +```bash +git checkout pr/42 +``` + +[*Read more about checking out pull requests locally.*](https://help.github.com/articles/checking-out-pull-requests-locally) + +### Empty Commits :trollface: +Commits can be pushed with no code changes by adding `--allow-empty`: + +```bash +$ git commit -m "Big-ass commit" --allow-empty +``` + +Some use-cases for this (that make sense), include: + + - Annotating the start of a new bulk of work or a new feature. + - Documenting when you make changes to the project that aren't code related. + - Communicating with people using your repository. + - The first commit of a repo, as the first commit cannot be rebased later: `git commit -m "init repo" --allow-empty`. + +![It ain't even that trolololol...](http://i.minus.com/il1jaw.gif) + +### Styled Git Status +Running: + +```bash +$ git status +``` + +Produces: + +![git status](http://i.imgur.com/qjPyvXb.png) + +By adding `-sb`: + +```bash +$ git status -sb +``` + +This is produced: + +![git status -sb](http://i.imgur.com/K0OY3nm.png) + +[*Read more about the Git `status` command.*](http://git-scm.com/docs/git-status) + +### Styled Git Log +Running: + +```bash +$ git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative +``` + +Produces: + +![git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative](http://i.imgur.com/58eOtkW.png) + +Credit to [Palesz](http://stackoverflow.com/users/88355/palesz) + +*This can be aliased using the instructions found [here](https://github.com/tiimgreen/github-cheat-sheet#aliases).* + +[*Read more about the Git `log` command.*](http://git-scm.com/docs/git-log) + +### Git Query +A Git query allows you to search all your previous commit messages and find the most recent one matching the query. + +```bash +$ git show :/query +``` + +Where `query` (case-sensitive) is the term you want to search, this then finds the last one and gives details on the lines that were changed. + +```bash +$ git show :/typo +``` +![git show :/query](http://i.imgur.com/icaGiNt.png) + +*Press `q` to quit.* + +### Merged Branches +Running: + +```bash +$ git branch --merged +``` + +Will give you a list of all branches that have been merged into your current branch. + +Conversely: + +```bash +$ git branch --no-merged +``` + +Will give you a list of branches that have not been merged into your current branch. + +[*Read more about the Git `branch` command.*](http://git-scm.com/docs/git-branch) + +### Fixup and Autosquash +If there is something wrong with a previous commit (can be one or more from HEAD), for example `abcde`, run the following command after you've amended the problem: +```bash +$ git commit --fixup=abcde +$ git rebase abcde^ --autosquash -i +``` +[*Read more about the Git `commit` command.*](http://git-scm.com/docs/git-commit) +[*Read more about the Git `rebase` command.*](http://git-scm.com/docs/git-rebase) + +### Web Server for Browsing Local Repositories +Use the Git `instaweb` command to instantly browse your working repository in `gitweb`. This command is a simple script to set up `gitweb` and a web server for browsing the local repository. + +```bash +$ git instaweb +``` + +Opens: + +![Git instaweb](http://i.imgur.com/Dxekmqc.png) + +[*Read more about the Git `instaweb` command.*](http://git-scm.com/docs/git-instaweb) + +### Git Configurations +Your `.gitconfig` file contains all your Git configurations. + +#### Aliases +Aliases are helpers that let you define your own git calls. For example you could set `git a` to run `git add --all`. + +To add an alias, either navigate to `~/.gitconfig` and fill it out in the following format: + +``` +[alias] + co = checkout + cm = commit + p = push + # Show verbose output about tags, branches or remotes + tags = tag -l + branches = branch -a + remotes = remote -v +``` + +...or type in the command-line: + +```bash +$ git config --global alias.new_alias git_function +``` + +For example: + +```bash +$ git config --global alias.cm commit +``` + +For an alias with multiple functions use quotes: + +```bash +$ git config --global alias.ac 'add -A . && commit' +``` + +Some useful aliases include: + +| Alias | Command | What to Type | +| --- | --- | --- | +| `git cm` | `git commit` | `git config --global alias.cm commit` | +| `git co` | `git checkout` | `git config --global alias.co checkout` | +| `git ac` | `git add . -A` `git commit` | `git config --global alias.ac '!git add -A && git commit'` | +| `git st` | `git status -sb` | `git config --global alias.st 'status -sb'` | +| `git tags` | `git tag -l` | `git config --global alias.tags 'tag -l'` | +| `git branches` | `git branch -a` | `git config --global alias.branches 'branch -a'` | +| `git remotes` | `git remote -v` | `git config --global alias.remotes 'remote -v'` | +| `git lg` | `git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --` | `git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"` | + +*Some Aliases are taken from [@mathiasbynens](https://github.com/mathiasbynens) dotfiles: https://github.com/mathiasbynens/dotfiles/blob/master/.gitconfig* + +#### Auto-Correct +If you type `git comit` you will get this: + +```bash +$ git comit -m "Message" +# git: 'comit' is not a git command. See 'git --help'. + +# Did you mean this? +# commit +``` + +To call `commit` when `comit` is typed, just enable auto-correct: + +```bash +$ git config --global help.autocorrect 1 +``` + +So now you will get this: + +```bash +$ git comit -m "Message" +# WARNING: You called a Git command named 'comit', which does not exist. +# Continuing under the assumption that you meant 'commit' +# in 0.1 seconds automatically... +``` + +#### Color +To add more color to your Git output: + +```bash +$ git config --global color.ui 1 +``` + +[*Read more about the Git `config` command.*](http://git-scm.com/docs/git-config) + +### Git Resources +| Title | Link | +| ----- | ---- | +| Official Git Site | http://git-scm.com/ | +| Official Git Video Tutorials | http://git-scm.com/videos | +| Code School Try Git | http://try.github.com/ | +| Introductory Reference & Tutorial for Git | http://gitref.org/ | +| Official Git Tutorial | http://git-scm.com/docs/gittutorial | +| Everyday Git | http://git-scm.com/docs/everyday | +| Git Immersion | http://gitimmersion.com/ | +| Ry's Git Tutorial | http://rypress.com/tutorials/git/index.html | +| Git for Designers | http://hoth.entp.com/output/git_for_designers.html | +| Git for Computer Scientists | http://eagain.net/articles/git-for-computer-scientists/ | +| Git Magic | http://www-cs-students.stanford.edu/~blynn/gitmagic/ | +| GitHub Training Kit | http://training.github.com/kit | + +#### Git Books +| Title | Link | +| ----- | ---- | +| Pragmatic Version Control Using Git | http://www.pragprog.com/titles/tsgit/pragmatic-version-control-using-git | +| Pro Git | http://git-scm.com/book | +| Git Internals PluralSight | https://github.com/pluralsight/git-internals-pdf | +| Git in the Trenches | http://cbx33.github.com/gitt/ | +| Version Control with Git | http://www.amazon.com/Version-Control-Git-collaborative-development/dp/1449316387 | +| Pragmatic Guide to Git | http://www.pragprog.com/titles/pg_git/pragmatic-guide-to-git | +| Git: Version Control for Everyone | http://www.packtpub.com/git-version-control-for-everyone/book | From ba2fb8c5f172ee8da4c87669634329b42f550e88 Mon Sep 17 00:00:00 2001 From: mdan312 Date: Thu, 29 Jan 2015 22:21:43 +0100 Subject: [PATCH 2/6] Update README.fr.md --- README.fr.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.fr.md b/README.fr.md index 2d8d881..ea0b929 100644 --- a/README.fr.md +++ b/README.fr.md @@ -1,7 +1,7 @@ -# GitHub Cheat Sheet -Une collection de cool fonctionnalités connu et moins connu pour Git et Github. Cette feuille de triche a été inspiré par le discours sur [Git and GitHub Secrets](http://www.confreaks.com/videos/1229-aloharuby2012-git-and-github-secrets) de [Zach Holman](https://github.com/holman) à la Aloha Ruby Conference 2012 ([diapositives](https://speakerdeck.com/holman/git-and-github-secrets)) et son discours [More Git and GitHub Secrets](https://vimeo.com/72955426) au WDCNZ 2013 ([diapositives](https://speakerdeck.com/holman/more-git-and-github-secrets)). +# Aide mémoire GitHub +Une collection d'astuces connues et moins connues pour Git et Github. Cette feuille aide mémoire a été inspirée par le discours sur [Git and GitHub Secrets](http://www.confreaks.com/videos/1229-aloharuby2012-git-and-github-secrets) de [Zach Holman](https://github.com/holman) à la Aloha Ruby Conference 2012 ([diapositives](https://speakerdeck.com/holman/git-and-github-secrets)) et son discours [More Git and GitHub Secrets](https://vimeo.com/72955426) au WDCNZ 2013 ([diapositives](https://speakerdeck.com/holman/more-git-and-github-secrets)). -*Shortlink: [`http://git.io/sheet`](http://git.io/sheet)* +*Lien court: [`http://git.io/sheet`](http://git.io/sheet)* *Lire ceci dans une autre langue: [English](README.md), [한국어](README.ko.md), [日本語](README.ja.md), [简体中文](README.zh-cn.md), [Français](README.fr.md).* @@ -18,10 +18,10 @@ Une collection de cool fonctionnalités connu et moins connu pour Git et Github. - [Gists](#gists) - [Git.io](#gitio) - [Raccourcis clavier](#keyboard-shortcuts) - - [Mise en évidence de ligne dans les dépôts](#line-highlighting-in-repositories) - - [Fermer des issues via les messages de Commit](#closing-issues-via-commit-messages) + - [Surlignage de lignes dans les dépôts](#line-highlighting-in-repositories) + - [Fermer des bogues via les messages de Commit](#closing-issues-via-commit-messages) - [Cross-Link Issues](#cross-link-issues) - - [Verouillage de conversations](#locking-conversations) + - [Verrouillage de conversations](#locking-conversations) - [Statut des CI dans les Pull Requests](#ci-status-on-pull-requests) - [Coloration syntaxique dans les fichiers Markdown](#syntax-highlighting-in-markdown-files) - [Emojis](#emojis) @@ -68,7 +68,7 @@ Une collection de cool fonctionnalités connu et moins connu pour Git et Github. ## GitHub ### Ignorer les espaces -Ajouter `?w=1` à n'importe quelle URL d'un diff supprimera tous les changements lié à des espaces, vous permettant de voir seulement le code qui a changé. +Ajouter `?w=1` à n'importe quelle URL d'un diff supprimera tous les changements liés à des espaces, vous permettant de voir seulement le code qui a changé. ![Diff sans les espaces](https://camo.githubusercontent.com/797184940defadec00393e6559b835358a863eeb/68747470733a2f2f6769746875622d696d616765732e73332e616d617a6f6e6177732e636f6d2f626c6f672f323031312f736563726574732f776869746573706163652e706e67) @@ -127,7 +127,7 @@ Pour utiliser GitHub afin de comparer les branches, modifier l'URL pour que cett https://github.com/{utilisateur}/{depot}/compare/{range} ``` -où `{range} = master...4-1-stable` +ou `{range} = master...4-1-stable` Par exemple: @@ -148,7 +148,7 @@ https://github.com/rails/rails/compare/master@{2014-10-04}...master ![Another compare example](http://i.imgur.com/5dtzESz.png) -...ce qui vous permet de voir la différence entre la branche principale jusqu'à un certain temps ou à une date spécifique. +...ce qui vous permet de voir la différence d'avec la branche principale jusqu'à une temps indiqué ou à une date spécifique. [*En savoir plus sur la comparaison des commits dans le temps.*](https://help.github.com/articles/comparing-commits-across-time) @@ -218,7 +218,7 @@ Sur la page d'un dépôt, les raccourcis clavier vous permettent de naviguer fac - Appuyer sur `w` fera apparaître le sélecteur de branche. - Appuyer sur `s` sélectionnera la barre de commandes. - Appuyer sur `l` va éditer les labels sur les issues existantes. - - Appuyer sur `y` **lorsque vous regardez un fichier** (e.g. `https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.md`) changera votre URL actuel vers une URL gêlant la page que vous êtes entrain de regarder. Si ce code change, vous serez toujours en mesure de voir ce que vous avez vu au moment de cette action. + - Appuyer sur `y` **lorsque vous regardez un fichier** (e.g. `https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.md`) changera votre URL actuel vers une URL gelant la page que vous êtes en train de regarder. Si ce code change, vous serez toujours en mesure de voir ce que vous avez vu au moment de cette action. Pour voir tous les raccourcis pour la page courante, pressez `?`: @@ -226,10 +226,10 @@ Pour voir tous les raccourcis pour la page courante, pressez `?`: [*En savoir plus sur l'utilisation de la barre de commandes.*](https://help.github.com/articles/using-the-command-bar) -### Mise en évidence de ligne dans les dépôts +### Surlignage de lignes dans les dépôts En ajoutant `#L52` à la fin de l'URL d'un fichier de code ou en cliquant simplement le numéro de ligne mettra cette dernière en évidence. -Cela fonctionne aussi avec les sélections multiples, ex. `#L53-L60`, pour effectuer une sélection multiple, maintenez `shift` et cliquez sur deux lignes: +Cela fonctionne aussi avec les sélections multiples, ex. `#L53-L60`, pour effectuer une sélection multiple, maintenez la touche `majuscule` et cliquez sur deux lignes: ``` https://github.com/rails/rails/blob/master/activemodel/lib/active_model.rb#L53-L60 @@ -237,27 +237,27 @@ https://github.com/rails/rails/blob/master/activemodel/lib/active_model.rb#L53-L ![Line Highlighting](http://i.imgur.com/8AhjrCz.png) -### Fermer des issues via les messages de Commit -Si un commit particulier corrige une issue, l'utilisation des mots-clés `fix/fixes/fixed`, `close/closes/closed` ou `resolve/resolves/resolved`, suivi du numéro de l'issue, fermera l'issue une fois committé sur la branche principale. +### Fermer des bogues via les messages de Commit +Si un commit particulier corrige un bogue, l'utilisation des mots-clés `fix/fixes/fixed`, `close/closes/closed` ou `resolve/resolves/resolved`, suivi du numéro de bogue, fermera le bogue une fois commité sur la branche principale. ```bash $ git commit -m "Fix screwup, fixes #12" ``` -Cela ferme l'issue et fait référence au commit associé. +Cela ferme le bogue et fait référence au commit associé. ![Closing Repo](http://i.imgur.com/Uh1gZdx.png) [*En savoir plus sur la fermeture des issues via les messages de Commit.*](https://help.github.com/articles/closing-issues-via-commit-messages) ### Cross-Link Issues -Pour créer un lien vers une issue d'un même dépôt, taper simplement `#` puis le numéro de l'issue, elle sera auto-lié. +Pour créer un lien vers un bogue d'un même dépôt, taper simplement `#` puis le numéro de bogue, il sera auto-lié. -Pour lier vers une issue d'un autre dépôt, `user_name/repo_name#ISSUE_NUMBER` ex. `tiimgreen/toc#12`. +Pour lier vers un bogue d'un autre dépôt, `user_name/repo_name#ISSUE_NUMBER` ex. `tiimgreen/toc#12`. ![Cross-Link Issues](https://camo.githubusercontent.com/447e39ab8d96b553cadc8d31799100190df230a8/68747470733a2f2f6769746875622d696d616765732e73332e616d617a6f6e6177732e636f6d2f626c6f672f323031312f736563726574732f7265666572656e6365732e706e67) -### Locking Conversations +### Verrouillage de conversation Pull Requests and Issues can now be locked by owners or collaborators of the repo. ![Lock conversation](https://cloud.githubusercontent.com/assets/2723/3221693/bf54dd44-f00d-11e3-8eb6-bb51e825bc2c.png) From 2a5d5e1a9ac630a7d647df3a855350f4362ff48d Mon Sep 17 00:00:00 2001 From: Sebastien Le Maguer Date: Mon, 19 Oct 2015 22:48:13 +0200 Subject: [PATCH 3/6] Avancement README --- README.fr.md | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/README.fr.md b/README.fr.md index ea0b929..34811cf 100644 --- a/README.fr.md +++ b/README.fr.md @@ -1,4 +1,4 @@ -# Aide mémoire GitHub +# Aide mémoire GitHub Une collection d'astuces connues et moins connues pour Git et Github. Cette feuille aide mémoire a été inspirée par le discours sur [Git and GitHub Secrets](http://www.confreaks.com/videos/1229-aloharuby2012-git-and-github-secrets) de [Zach Holman](https://github.com/holman) à la Aloha Ruby Conference 2012 ([diapositives](https://speakerdeck.com/holman/git-and-github-secrets)) et son discours [More Git and GitHub Secrets](https://vimeo.com/72955426) au WDCNZ 2013 ([diapositives](https://speakerdeck.com/holman/more-git-and-github-secrets)). *Lien court: [`http://git.io/sheet`](http://git.io/sheet)* @@ -186,8 +186,8 @@ Cela signifie que vous pouvez également modifier et pousser des mises à jour v ```bash $ git commit -$ Username for 'https://gist.github.com': -$ Password for 'https://tiimgreen@gist.github.com': +$ Username for 'https://gist.github.com': +$ Password for 'https://tiimgreen@gist.github.com': ``` [*En savoir plus sur la création de gists.*](https://help.github.com/articles/creating-gists) @@ -258,27 +258,28 @@ Pour lier vers un bogue d'un autre dépôt, `user_name/repo_name#ISSUE_NUMBER` e ![Cross-Link Issues](https://camo.githubusercontent.com/447e39ab8d96b553cadc8d31799100190df230a8/68747470733a2f2f6769746875622d696d616765732e73332e616d617a6f6e6177732e636f6d2f626c6f672f323031312f736563726574732f7265666572656e6365732e706e67) ### Verrouillage de conversation -Pull Requests and Issues can now be locked by owners or collaborators of the repo. +Les Pull Requests et les issues peuvent maintenant être verrouillés par les propriétaires et les collaborateurs du dépot. ![Lock conversation](https://cloud.githubusercontent.com/assets/2723/3221693/bf54dd44-f00d-11e3-8eb6-bb51e825bc2c.png) -This means that users who are not collaborators on the proejct will no longer be able to comment. +Cela implique que les personnes qui ne sont pas collaborateurs ne pourront plus ajouter de commentaire. ![Comments locked](https://cloud.githubusercontent.com/assets/2723/3221775/d6e513b0-f00e-11e3-9721-2131cb37c906.png) -[*Read more about locking conversations.*](https://github.com/blog/1847-locking-conversations) +[*Plus d'information sur le verrouillage (En anglais)*](https://github.com/blog/1847-locking-conversations) -### CI Status on Pull Requests -If set up correctly, every time you receive a Pull Request, [Travis CI](https://travis-ci.org/) will build that Pull Request just like it would every time you make a new commit. Read more about how to [get started with Travis CI](http://docs.travis-ci.com/user/getting-started/). +### Status CI dans les Pull request +Si la configuration de [Travis CI](https://travis-ci.org/) a été effectuée correctement, à chaque +pull request effectué, [Travis CI](https://travis-ci.org/) tentera de générer le projet comme s'il s'agit de +l'un de vos propres commits. Plus d'information sur cette page : [get started with Travis CI](http://docs.travis-ci.com/user/getting-started/). [![Travis CI status](https://cloud.githubusercontent.com/assets/1687642/2700187/3a88838c-c410-11e3-9a46-e65e2a0458cd.png)](https://github.com/octokit/octokit.rb/pull/452) -[*Read more about the commit status API.*](https://github.com/blog/1227-commit-status-api) - -### Syntax Highlighting in Markdown Files -For example, to syntax highlight Ruby code in your Markdown files write: +[*Plus d'information sur l'API associé au statut du commit (En anglais).*](https://github.com/blog/1227-commit-status-api) +### Coloration syntaxique dans les fichiers Markdown +Par exemple, pour effectuer une coloration syntaxique pour un code ruby, écrivez dans le fichier markdown ceci : ```ruby require 'tabbit' table = Tabbit.new('Name', 'Email') @@ -286,7 +287,7 @@ For example, to syntax highlight Ruby code in your Markdown files write: puts table.to_s ``` -This will produce: +Ceci va produire : ```ruby require 'tabbit' @@ -295,16 +296,18 @@ table.add_row('Tim Green', 'tiimgreen@gmail.com') puts table.to_s ``` -GitHub uses [Linguist](https://github.com/github/linguist) to perform language detection and syntax highlighting. You can find out which keywords are valid by perusing the [languages YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). +GitHub se basent sur [Linguist](https://github.com/github/linguist) pour déterminer le language +utilisé et effectuer la coloration syntaxique. Vous pouvez savoir quels sont les identifiants de +langages valides dans le [fichier de languages YAML](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). -[*Read more about GitHub Flavored Markdown.*](https://help.github.com/articles/github-flavored-markdown) +[*Plus d'informations sur le format Markdown GitHub (GitHub Flavored Markdown) (En anglais).*](https://help.github.com/articles/github-flavored-markdown) ### Emojis -Emojis can be added to Pull Requests, Issues, commit messages, etc. using `:name_of_emoji:` +Les Emojis peuvent être insérés dans les Pull Requests, les Issues, les messages de commit , etc. en utilisant la syntaxe `:name_of_emoji:` -The full list of supported Emojis on GitHub can be found at [emoji-cheat-sheet.com](http://www.emoji-cheat-sheet.com/) or [scotch-io/All-Github-Emoji-Icons](https://github.com/scotch-io/All-Github-Emoji-Icons). +La liste complète des Emojis proposés sur GitHub est disponible sur [emoji-cheat-sheet.com](http://www.emoji-cheat-sheet.com/) ou [scotch-io/All-Github-Emoji-Icons](https://github.com/scotch-io/All-Github-Emoji-Icons). -The top 5 used Ejmojis on GitHub are: +Les top 5 des Emojis utilisés sur GitHub sont : 1. :shipit: - `:shipit:` 2. :sparkles: - `:sparkles:` @@ -313,13 +316,13 @@ The top 5 used Ejmojis on GitHub are: 5. :clap: - `:clap:` ### Images/GIFs -Images and GIFs can be added to comments, READMEs etc.: +Les Images et GIFs peuvent être intégrés dans les commentaires, README, etc. : ``` ![Alt Text](http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif) ``` -Raw images from the repo can be used by calling them directly.: +Les images présentes dans un dépôt peuvent être utilisés directement : ``` ![Alt Text](https://github.com/(user)/(repo)/raw/master/path/to/image.gif) @@ -451,7 +454,7 @@ GitHub supports rendering tabular data in the form of `.csv` (comma-separated) a [*Read more about rendering tabular data.*](https://github.com/blog/1601-see-your-csvs) ###Revert a Pull Request -After a pull request is merged, you may find it does not help anything or it was a bad decision to merge the pull request. +After a pull request is merged, you may find it does not help anything or it was a bad decision to merge the pull request. You can revert it by clicking the **Revert** button on the right side of a commit in the pull request page to create a pull request with reverted changes to this specific pull request. From 170169ad83c52d668924e30e9a52b175d69fa5de Mon Sep 17 00:00:00 2001 From: Sebastien Le Maguer Date: Mon, 19 Oct 2015 22:59:30 +0200 Subject: [PATCH 4/6] Progress until "quick quoting" --- README.fr.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.fr.md b/README.fr.md index 34811cf..a1fb4c9 100644 --- a/README.fr.md +++ b/README.fr.md @@ -269,7 +269,7 @@ Cela implique que les personnes qui ne sont pas collaborateurs ne pourront plus [*Plus d'information sur le verrouillage (En anglais)*](https://github.com/blog/1847-locking-conversations) -### Status CI dans les Pull request +### Statut des CI dans les Pull Requests Si la configuration de [Travis CI](https://travis-ci.org/) a été effectuée correctement, à chaque pull request effectué, [Travis CI](https://travis-ci.org/) tentera de générer le projet comme s'il s'agit de l'un de vos propres commits. Plus d'information sur cette page : [get started with Travis CI](http://docs.travis-ci.com/user/getting-started/). @@ -322,7 +322,7 @@ Les Images et GIFs peuvent être intégrés dans les commentaires, README, etc. ![Alt Text](http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif) ``` -Les images présentes dans un dépôt peuvent être utilisés directement : +Les images présentes dans un dépôt peuvent être utilisées directement : ``` ![Alt Text](https://github.com/(user)/(repo)/raw/master/path/to/image.gif) @@ -330,25 +330,25 @@ Les images présentes dans un dépôt peuvent être utilisés directement : ![Peter don't care](http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif) -All images are cached on GitHub, so if your host goes down, the image will remain available. +L'ensemble des images sont sauvegardés par GitHub. Ainsi, même si l'accès à l'image originale est perdu, le rendu n'est pas affecté. -#### Embedding Images in GitHub Wiki -There are multiple ways of embedding images in Wiki pages. There's the standard Markdown syntax (shown above). But there's also a syntax that allows things like specifying the height or width of the image: +#### L'intégration d'images dans le Wiki GitHub +Il ya plusieurs moyens d'intégrés des images dans les pages Wiki. Tout d'abord, il y a la syntaxe standard Markdown (illustré ci-dessus). Une syntaxe plus évoluée est également présente. Elle permet d'imposer la longueur et la largeur de l'image : ```markdown [[ http://www.sheawong.com/wp-content/uploads/2013/08/keephatin.gif | height = 100px ]] ``` -Which produces: +qui produit ![Just a screenshot](http://i.imgur.com/J5bMf7S.png) -### Quick Quoting -When on a comment thread and you want to quote something someone previously said, highlight the text and press `r`, this will copy it into your text box in the block-quote format. +### Citation rapide +Si vous souhaitez citer quelquechose écrit par quelqu'un précédemment, lorsque vous écrivez un commentaire, surlignez le texte et pressez la touche `r`. Ceci aura pour effet de copier le texte et de le formatter pour effectuer la citation. ![Quick Quote](https://f.cloud.github.com/assets/296432/124483/b0fa6204-6ef0-11e2-83c3-256c37fa7abc.gif) -[*Read more about quick quoting.*](https://github.com/blog/1399-quick-quotes) +[*Plus d'informations sur la citation rapide (En anglais).*](https://github.com/blog/1399-quick-quotes) ### Pasting Clipboard Image to Comments After taking a screenshot and adding it to the clipboard (mac: `cmd-ctrl-shift-4`), you can simply paste (`cmd-v / ctrl-v`) the image into the comment section and it will be auto-uploaded to github. From d5f016667d01429e8926357dae9493f68c247352 Mon Sep 17 00:00:00 2001 From: Sebastien Le Maguer Date: Mon, 19 Oct 2015 23:08:26 +0200 Subject: [PATCH 5/6] Until licensing --- README.fr.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.fr.md b/README.fr.md index a1fb4c9..8832032 100644 --- a/README.fr.md +++ b/README.fr.md @@ -29,7 +29,7 @@ Une collection d'astuces connues et moins connues pour Git et Github. Cette feui - [L'intégration d'images dans le Wiki GitHub](#embedding-images-in-github-wiki) - [Citation rapide](#quick-quoting) - [Coller une image du Presse-papier dans les commentaires](#pasting-clipboard-image-to-comments) - - [Quick Licensing](#quick-licensing) + - [Intégration rapide d'une licence](#quick-licensing) - [Listes de tâches](#task-lists) - [Listes de tâches dans les documents Markdown](#task-lists-in-markdown-documents) - [Liens relatifs](#relative-links) @@ -350,25 +350,25 @@ Si vous souhaitez citer quelquechose écrit par quelqu'un précédemment, lorsqu [*Plus d'informations sur la citation rapide (En anglais).*](https://github.com/blog/1399-quick-quotes) -### Pasting Clipboard Image to Comments -After taking a screenshot and adding it to the clipboard (mac: `cmd-ctrl-shift-4`), you can simply paste (`cmd-v / ctrl-v`) the image into the comment section and it will be auto-uploaded to github. +### Coller une image du Presse-papier dans les commentaires +Après avoir effectué une capture d'écran et l'avoir ajouté au presse-papier (mac: `cmd-ctrl-shift-4`), il vous suffit de coller (`cmd-v / ctrl-v`) l'image dans le commentaire. L'image sera alors automatique mise en ligne sur GitHub. ![Pasting Clipboard Image to Comments](https://cloud.githubusercontent.com/assets/39191/5794265/39c9b65a-9f1b-11e4-9bc7-04e41f59ea5f.png) -[*Read more about issue attachments.*](https://help.github.com/articles/issue-attachments) +[*Plus d'informations sur les pièces jointes des issues (En anglais).*](https://help.github.com/articles/issue-attachments) -### Quick Licensing -When creating a repository, GitHub gives you the option of adding in a pre-made license: +### Intégration rapide d'une licence +Lors de la création d'un dépôt, GitHub vous permet d'ajouter un fichier de licence prédéfini : ![License](http://i.imgur.com/Chqj4Fg.png) -You can also add them to existing repositories by creating a new file through the web interface. When the name `LICENSE` is typed in you will get an option to use a template: +Vous pouvez également les ajouter à un dépôt existant en créant un nouveau fichier via l'interface web. Si le nom du fichier est `LICENSE` vous aurez alors la possibilité d'utiliser un fichier de licence prédéfini : ![License](http://i.imgur.com/fTjQict.png) -Also works for `.gitignore`. +Ceci fonctionne également pour `.gitignore`. -[*Read more about open source licensing.*](https://help.github.com/articles/open-source-licensing) +[*Plus d'information sur les licences open source (En anglais).*](https://help.github.com/articles/open-source-licensing) ### Task Lists In Issues and Pull requests check boxes can be added with the following syntax (notice the space): From 39db4c891368d5b065ac16e70a72350ea60c0561 Mon Sep 17 00:00:00 2001 From: Sebastien Le Maguer Date: Mon, 19 Oct 2015 23:22:12 +0200 Subject: [PATCH 6/6] =?UTF-8?q?Liste=20de=20t=C3=A2ches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.fr.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.fr.md b/README.fr.md index 8832032..62c6465 100644 --- a/README.fr.md +++ b/README.fr.md @@ -370,8 +370,8 @@ Ceci fonctionne également pour `.gitignore`. [*Plus d'information sur les licences open source (En anglais).*](https://help.github.com/articles/open-source-licensing) -### Task Lists -In Issues and Pull requests check boxes can be added with the following syntax (notice the space): +### Liste de tâches +Dans les bogues et les pull requests, des boîtes à cocher peuvent être ajoutées en utilisant la syntaxe suivante (remarquez l'espace) : ``` - [ ] Be awesome @@ -384,7 +384,7 @@ In Issues and Pull requests check boxes can be added with the following syntax ( ![Task List](http://i.imgur.com/jJBXhsY.png) -When they are clicked, they will be updated in the pure Markdown: +Lorsqu'un utilisateur clique sur une tâche, elle est mise à jour dans le format Markdown : ``` - [x] Be awesome @@ -395,10 +395,10 @@ When they are clicked, they will be updated in the pure Markdown: - [ ] Sleep ``` -[*Read more about task lists.*](https://help.github.com/articles/writing-on-github#task-lists) +[*Plus d'informations sur les listes de tâches (En anglais).*](https://help.github.com/articles/writing-on-github#task-lists) -#### Task Lists in Markdown Documents -In full Markdown documents **read-only** checklists can now be added using the following syntax: +#### Listes de tâches dans les documents Markdown +Dans les documents Markdown, il est maintenant possible d'ajouter des listes de boîtes à cocher en **lecture seule** en utilisant la syntaxe suivante : ``` - [ ] Mercury @@ -418,7 +418,7 @@ In full Markdown documents **read-only** checklists can now be added using the f - [ ] Deimos - [ ] Phobos -[*Read more about task lists in markdown documents.*](https://github.com/blog/1825-task-lists-in-all-markdown-documents) +[*Plus d'informations sur les listes de tâches dans les documents Markdown (En anglais)*](https://github.com/blog/1825-task-lists-in-all-markdown-documents) ### Relative Links Relative links are recommended in your Markdown files when linking to internal content.