Skip to content

antoinebollinger/git_tuto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Tuto git

Ouvrir un terminal dans le dossier du projet (pour s'y rendre: cd /repertoire_de_mon_projet).

Initialisation

  • git init

Gestion des branches

Affichage des branches

  • git branch Cela renvoie la liste des branches. La branche actuelle chargée est marquée d'un astérisque (*). La branche principale par défaut est appelée master.

Ajout de branche

  • git branch nom_de_la_branche

Changer de branche de travail

  • git checkout nom_de_la_branche

Gestion des repos distants

Ajout repo distant (généralement nommé origin)

  • git remote add origin url_du_repo_distant

Voir les repos distants associés

  • git remote -v

Voir le status du projet

  • git status

Ajouter des fichiers (stage)

  • git add nom_du_fichier
  • git add -A pour tout ajouter

Commiter les fichiers du stage

  • git commit -m "message_du_commit"

Push d'une branche (ici master) vers le repo distant (ici origin)

  • git push origin master

Illustration

Illustration

About

Petit mémo sur les principales commandes git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published