5 - GTA - Support de Cours - Partie Git Gitlab
5 - GTA - Support de Cours - Partie Git Gitlab
Anis Hachani
Formateur et consultant
Certifié
OCJP , RHCE 6&7, LPIC-3, OCP
, Comptia Security +, Agile ( PSM
), CISA
• Git:
• Github, Svn, Gitlab, bitbucket git install ( windows,
linux )
• Travail unique
• merge confilts
• les branches
• Travail en mode équipe
• git flow
• Git ssh
• Gitlab - notification
Formation LPIC 1 : Junior Level Linux
Formation Git sous Gitlab
Git is a piece of software that allows you to perform version control. Large
software projects require some piece of software to keep track of all the
different changes made to a code base in order to track things like: Who
edited a certain file; what they changed; and how to get back to the
original code if necessary. Git does all of these things and more, so it's
not surprising that most large software companies use git!
Git is a distributed version control system, and succeeds centralized
systems, such as CVS and SVN. Centralized systems required all
users to connect to a centralized server before editing a file. As a
distributed system, each user has all the code and revision history on the
computer they're working o
Git software is installed on a workstation and acts as a client and a server. With SVN, there
is a separate server and client. With Git, every developer has a local copy of the full
version history of the project on their individual machine. With SVN, only the files a
developer is working on are kept on the local machine, and the developer must be online,
working with the server.
SVN users check out files and commit changes back to the server. Git changes happen
locally. The advantage is that the developer doesn’t have to be connected all the time.
Once all the files are downloaded to the developer’s workstation, local operations are
faster.
In the past, Git developers each having a copy of the full version history meant they could
easily share changes before pushing them to a central repository. Now all the sharing is
done in central repositories, like a GitHub. And, in today’s world, enterprises have projects
that span multiple repositories that include large binary files. As projects grow,
storing locally is not really realistic or desirable. When it comes to Git vs. SVN
performance, the client-server model of SVN outperforms with larger files and code bases.
git diff HEAD~1 == git diff 9398b88 : affiche l’emplacement entre le header actuel et le dernier commit
How to make Git “forget” about a file that was tracked but is now in .
gitignore?
https://docs.gitlab.com/ee/ci/README.html
cat /home/anis/.ssh/id_rsa.pub
ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQDfQjBpwwEgtdxpHyVe4ZhtDmrQ+VigiL9s/2Sojq0bWUh7lNdFs8IuQ0iy2KM
za/
oeZNxX5C2dgBTHGtAk2aLwJoXmc+wrtJn9frGFE8tR9IarR7mvhKvog6cVYbGPDnGvaog9GJuQjnhzAJMaqi0ymcABtwe
OKx1e7xGGuMtSH/
XyeXiMd5V4QM22UaKIOPRy262nHrUeV7UZ0AMFepTiScZbUJ6mcwWVYGq2mpKCbtnnoxJEWyoO40cgKnrytM2Qzx1
VNil1Sonydgot7LOJdkqUkL6ZmXmoxby7EEVxcs/3b0Qt7j1SYE/Z2NX0uM8CgFqFflxnRvCbjO+59YwH
[email protected]
Il faut sortir
de la branche
cni et
effectuer le
merge aupres
de la branche
master
Git tags
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Git tags
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Restaurer notre repository local vers la version v1.0 ! Git checkout V1.0
Note : git checkout v1.0 vous permet de revenir en arrière sans avoir effectuer des modifications, si nous
voulons faire des modification, on crée une branch à partir du point V1.0,
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Restaurer notre repository local vers la version v1.0 ! Git checkout V1.0
Note : git checkout v1.0 vous permet de revenir en arrière sans avoir effectuer des modifications, si nous
voulons faire des modification, on crée une branch à partir du point V1.0,
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Git submodules
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Je suis sur le tag v1.0, j’ai ajouté un fichier, j’ai fait un push, j’ai rien trouvé
sur le server
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Si nous
voulons
traivailler et
etre à
l’écoute
dans autre
répository
( mis à jours
d’une
librarie)
On utilise
les
submodules
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Formation DevOps Tools Engineer
Anis Hachani Formateur DevOps et Coach AgileOCJP, RHCE 6 & 7, DevOPS, LPIC-3, AWS, OCP, Comptia Sec+, Agile ( PSM I, PSPO, SMAC,
SPOAC ) chez Ghazela Technology Academy, www.ghazelatc.com, [email protected] , +216 71 866142, +216 54 828 018
Crea