< Retour
Git
Lister les branches distantes
git branch -a
* master
branch-1
branch-2
Créer une branche local 'branch-1' setup sur la branche distante branch-1
git checkout CMP-37
Branch 'CMP-37' set up to track remote branch 'CMP-37' from 'origin'.
Switched to a new branch 'CMP-37'
Pour vérifier où on pointe
git remote -v
Pour supprimer un fichier (attention ça supprime aussi sur l'ordi)
git rm file1.txt
git commit -m "removed file1.txt"
Pour supprimer un dossier avec ce qu'il y a dedans (attention ça supprime aussi sur l'ordi)
git rm myfolder -r
git commit -m "removed file1.txt"
Pour supprimer de git mais pas de l'ordi
git rm --cached file1.txt