aboutsummaryrefslogtreecommitdiff
path: root/files/fr/mdn/contribute/github_cheatsheet/index.html
diff options
context:
space:
mode:
authortristantheb <tristantheb@users.noreply.github.com>2021-05-25 20:47:40 +0200
committerGitHub <noreply@github.com>2021-05-25 20:47:40 +0200
commit2a41c9c3d9c4660702c31bb68562958ecb44ee3e (patch)
tree6cc7a7ac6e0b21d48787798f8d2cbd52e45122c9 /files/fr/mdn/contribute/github_cheatsheet/index.html
parent88b7b3760b34284f9ba01333052d49710ce77904 (diff)
downloadtranslated-content-2a41c9c3d9c4660702c31bb68562958ecb44ee3e.tar.gz
translated-content-2a41c9c3d9c4660702c31bb68562958ecb44ee3e.tar.bz2
translated-content-2a41c9c3d9c4660702c31bb68562958ecb44ee3e.zip
L10N: Update the MDN Guideline (important pages only) with Yari and Git/GitHub (#371)
* UPDATE: Code guideline page is now up-to-date from the US version * CREATE: Add the general code guildeline page * CREATE: Add the CSS code guideline page * CREATE: Add the HTML code guideline page * FIX: Fix some elements on pages * CREATE: Add the JavaScript code guideline page * Pre-Creaate english version of other Guildelines pages * L10N: Update translation of the Javascript code guildeline page * L10N: Update translation of the Shell code guildeline page * FIX: Add missing class on the Code Guideline * UPDATE: Up-to-date the Feedback page * UPDATE: Up-to-date the Getting started page * L10N: Translate the Github for beginners page * UPDATE: Update indexes of Guideline and Contribute * L10N: Translation of the two Github additional guide pages * L10N: Translation of the Help for beginners page * L10N: Translation of the Localize page * L10N: Translation of the Open_source_etiquette rules * UPDATE: Remove wrong html element and update title for Processes page * L10N: Translation of the Where is everything page * L10N: Important translation of the Documentation priorities page * Meta - Review priority * Meta - Review feedback * Meta - Review Getting started * Review - minor edits * Review - minor typos * Review - few rewordings * Review - minor rewordings * Review - minor lint * Review - Consistency with MDN vs le MDN * Review - update / ko / link ks * Review - minor rewordings * Review - Complement since no subpage * Review - minor typo * Review - rm cssxref * Review - minor fixes * Review - minor fixes * Review - minor fixes * Review - minor fixes * Review - minor fixes * Review - Complete translation of doc * Review - Complete translation * Review - complete translation * Review - complete translation * Review - minor rewording * Review - Complete translation * Review - Localization of style guide in Fr Co-authored-by: julieng <julien.gattelier@gmail.com>
Diffstat (limited to 'files/fr/mdn/contribute/github_cheatsheet/index.html')
-rw-r--r--files/fr/mdn/contribute/github_cheatsheet/index.html83
1 files changed, 83 insertions, 0 deletions
diff --git a/files/fr/mdn/contribute/github_cheatsheet/index.html b/files/fr/mdn/contribute/github_cheatsheet/index.html
new file mode 100644
index 0000000000..6bf6de934e
--- /dev/null
+++ b/files/fr/mdn/contribute/github_cheatsheet/index.html
@@ -0,0 +1,83 @@
+---
+title: Aide-mémoire GitHub
+slug: MDN/Contribute/GitHub_cheatsheet
+tags:
+ - Best practices
+ - Community
+ - GitHub
+ - MDN
+ - Beginners
+ - Cheatsheet
+ - Commands
+translation_of: MDN/Contribute/GitHub_cheatsheet
+---
+<p>{{MDNSidebar}}</p>
+
+<p class="summary">Cet article fournit une référence rapide aux commandes essentielles dont vous aurez besoin lorsque vous utiliserez <a href="https://git-scm.com/">Git</a> et <a href="https://github.com/">GitHub</a> pour contribuer à MDN. Si vous êtes novice dans l'utilisation de ces outils et avez besoin d'un coup de pouce, notre tutoriel <a href="/fr/docs/MDN/Contribute/GitHub_beginners">GitHub pour les débutants</a> vous enseigne les bases.</p>
+
+<h2 id="Cloning">Cloner</h2>
+
+<pre class="brush: bash">git clone <em>url-du-depot</em></pre>
+
+<h2 id="setting_up_a_remote">Configurer une référence à un dépôt distant</h2>
+
+<pre class="brush: bash">git remote add <em>nom-ref-distante</em> <em>url-du-depot-distant-a-referencer</em></pre>
+
+<h2 id="view_remotes_list">Afficher la liste des références distantes</h2>
+
+<pre class="brush: bash">git remote -v</pre>
+
+<h2 id="preparing_to_make_a_change_to_the_repo">Préparer une modification du dépôt</h2>
+
+<h3 id="switch_to_the_main_branch">Basculer sur la branche principale</h3>
+
+<pre class="brush: bash">git switch main</pre>
+
+<h3 id="update_your_main_branch">Mettre à jour votre branche principale</h3>
+
+<pre class="brush: bash">git fetch <em>nom-ref-distante</em>
+git rebase <em>nom-ref-distante</em>/main
+git push</pre>
+
+<h2 id="get_your_branch_locally_and_switch_to_it">Obtenir sa branche en local et basculer sur celle-ci</h2>
+
+<pre class="brush: bash">git pull
+git switch nouvelle-branche</pre>
+
+<h2 id="get_latest_status">Obtenir le dernier statut</h2>
+
+<pre class="brush: bash">git status</pre>
+
+<h2 id="adding_committing_and_pushing_changes">Ajouter, valider et pousser les changements</h2>
+
+<pre class="brush: bash">git add chemin-fichier-modifie
+git commit -m 'mon message de commit'
+git push</pre>
+
+<h2 id="troubleshooting">Dépannage</h2>
+
+<h3 id="reverting_a_change_you_made_to_a_file_that_you_havent_yet_added_to_the_commit_list">Annuler une modification non indexée</h3>
+
+<pre class="brush: bash">git restore <em>chemin-du-fichier</em></pre>
+
+<h3 id="removing_a_file_from_the_commit_list">Retirer un fichier de l'index</h3>
+
+<pre class="brush: bash">git restore --staged <em>chemin-du-fichier</em></pre>
+
+<h3 id="reversing_a_commit">Annuler le dernier commit</h3>
+
+<pre class="brush: bash">git reset HEAD~1</pre>
+
+<h3 id="reversing_a_commit_that_has_been_pushed_to_the_remote_fork">Inverser un commit qui a été poussé vers la bifurcation distante</h3>
+
+<pre class="brush: bash">git revert HEAD
+git push</pre>
+
+<div class="note notecard">
+ <p><b>Note :</b></p>
+ <p>Une autre façon de se débarrasser de fichiers qui se sont retrouvés dans des <i>pull requests</i> (demandes de triage) que vous ne voulez pas voir figurer est d'utiliser l'interface utilisateur de GitHub. Allez sur la page de votre demande sur github.com, allez dans l'onglet « Files changed », et trouvez le fichier que vous voulez supprimer de la demande. En haut à droite de la boîte du fichier dans la page, il y aura un menu à « trois points » (<code>...</code>). Appuyez sur ce bouton et choisissez « Delete file ». Dans la page de confirmation, entrez un titre pour le nouveau commit, assurez-vous que la case « Commit directly… » est cochée, et appuyez sur le bouton « Commit changes ».</p>
+</div>
+
+<h2 id="want_to_see_more">Vous voulez en voir plus ?</h2>
+
+<p>Si vous pensez que cet aide-mémoire devrait contenir plus de commandes, veuillez <a href="https://github.com/mdn/translated-content/issues/new">créer un ticket</a> pour suggérer ce que vous pensez que nous devrions inclure.</p>