Vous êtes sur la page 1sur 1

Cours git

*Définir l'identité de l'utilisateur


$ git config --global user.name " "
$ git config --global user.email " "
*Création d'un projet
$ mkdir projetimmo_STI
*Initialisation git dans le projet
$ git init
*Etat du projet
$ git status
*Ajouter un fichier
$ git add index.html

*PHOTO DU PROJET
$ git commit -m "initialisationimmo"
$ git commit -m "modificationmenu"
*Historique des modification
$ git log
*Création d'une branche
$ git branch Titre
*Lister les branches
$ git branch
*Selection d'une branche
$ git checkout Titre
*Envoyer le projet du titre vers master
$ git checkout master
$ git merge titre
*Suprimmer la branche titre (facultatif)
$ git branch -d titre
*Associer dépôt distant à notre dépôt local
$ git remote add origin https://github.com/pgomis07/projetimmo.git
* Vérification du depôt distant
$ git remote
* Déposer le projet
$ git push origin master
$ git push -u pgomis07 origin master

Vous aimerez peut-être aussi