Skip to content

Instantly share code, notes, and snippets.

@Xisabla
Created March 30, 2021 14:27
Show Gist options
  • Save Xisabla/aeed8a10f8062e5fa74d893dd2f974dd to your computer and use it in GitHub Desktop.
Save Xisabla/aeed8a10f8062e5fa74d893dd2f974dd to your computer and use it in GitHub Desktop.

Very basic

git clone https://github.com/Xisabla/DAUville
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

Basic

git status 	# Afficher ce qui se passe (ce qui est en stage ou non)
git add <file>	 # Passer un fichier/dossier en stage
git reset <file> # Retirer un fichier/dossier du stage
git commit -m "courte explication des changements (eg: change background color)"	# Création d'un "paquet" avec le stage actuel
git push	# Envoie des paquets sur le serveur
git pull	# Récupération des paquets

Branches

git branch # Connaitre la branche actuelle et les autres branches
git checkout <branch>		# Aller sur une autre branche
git checkout -b <branch>	# Créer une nouvelle branche
git merge <branch>	# Ramène les changements d'une autre branche sur la branche actuelle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment