----- # Custom isHidden: false menupriority: 30 kind: article date: 2009-11-12T11:39:54+02:00 title: The Adventure Begins multiTitle: fr: Liste de commandes en: Command List tags: - git ----- # Command List ## Command for each functionality In the first part, we saw the list of resolved problem by [Git][git]. To resume [Git][git] should do: - récupérer les modifications des autres ; - envoyer ses modifications aux autres ; - revenir dans le temps ; - lister les différences entre chaque version ; - nommer certaines versions pour s'y référer facilement ; - afficher l'historique des modifications ; - savoir qui a fait quoi et quand ; - gérer des conflits ; - manipuler facilement des branches. - get others modifications, - send modifications to others, - get back in time, - list differences between each version, - name some versions in order to refer easily to them, - write an historic of modifications, - know who did what and when, - manage conflicts, - easily manage branches. ### get others modifications $ git pull ### send modifications to others $ git push or more generally $ git pull $ git push ### get back in time #### For all tree $ git checkout $ git revert revert three version before (see my `.gitconfig` file). $ git uncommit 3 Undo the las merge (if something goes wrong) $ git revertbeforemerge #### For one file $ git checkout file $ git checkout VersionHash file $ git checkout HEAD~3 file ### list differences between each version list files being modified $ git status fr:différences entre les fichier de la dernière version et les fichiers locaux. $ git diff liste les différences entre les fichier d'une certaine version et les fichiers locaux. $ git diff VersionHash fichier ### name some version to refer to them in the future $ git tag 'toto' ### show historic of modifications $ git log $ git lg $ git logfull ### en:know who did what and when:: $ git blame fichier ### handle conflicts $ git conflict ### manage branches To create a branch: $ git branch branch_name To change the current branch: $ git checkout branch_name [git]: http://git-scm.org "Git"