blob: fa04d52f4c25c051bf36aca49ffe0d09db5a78de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
PARTIE 1 installation
config utilisateur
=> fichier .gitconfig
git config --global user.name "username"
git config --global user.email "e-mail"
sur github
- créer un "nouveau repository" avec un nom concis en minuscules et avec des tirets
- le rendre "public"
- récupérer son adresse HTTPS
dans la console télécharger le dépôt et entrer dedans:
git clone url.git
cd nom_depot
créer le readme.md
echo "Bonjour" > README.md
afficher l'espace de staging (on a de nouveaux fichiers non commités)
git status
ajouter ou modifier un fichier
git add readme.md
git add "TP GIT.txt"
annuler un "add"
git rm --cached "fichier"
annuler un "add" et retirer le fichier du projet
git rm -f --cached "fichier"
je me suis trompé mon fichier README.md s'appelle en fait readme.md
git rm -f --cached readme.md
git add README.md
git status montre que le fichier a bien été renommé
commit
git commit -m "ajout du fichier README.md"
git status montre maintenant que readme.md a disparu l'espace de staging est vide
envoyer les changements sur le serveur
git push
|