SlideShare a Scribd company logo
Git for developers
Source code management with git
1
La 1ère école 100 % dédiée à l'open source
Open Source School est fondée à l'initiative de Smile, leader de
l'intégration et de l'infogérance open source, et de l'EPSI,établissement
privé pionnier de l’enseignement supérieur en informatique.
Dans le cadre du Programme d’Investissements d’Avenir (PIA), le
gouvernement français a décidé de soutenir la création de cette école en
lui attribuant une première aide de 1,4M€ et confirme sa volonté de
soutenir la filière du Logiciel Libre actuellement en plein développement.
Avec une croissance annuelle de plus de 10%, et 4 000
postes vacants chaque année dans le secteur du Logiciel
Libre, OSS entend répondre à la pénurie de compétences du
secteur en mobilisant l’ensemble de l’écosystème et en
proposant la plus vaste offre en matière de formation aux
technologies open source tant en formation initiale qu'en
formation continue.
2
Les formations du plein emploi !
 Formation Continue
Open Source School "Executive Education" est un organisme
de formation qui propose un catalogue de plus de 200
formations professionnelles et différents dispositifs de
reconversion permettant le retour à l’emploi (POE) ou une
meilleure employabilité pour de nombreux professionnels de
l’informatique.
 Pour vos demandes : formations@opensourceschool.fr
 Formation Initiale
100% logiciels libres et 100% alternance, le cursus Open
Source School s’appuie sur le référentiel des blocs de
compétences de l’EPSI.
Il est sanctionné par un titre de niveau I RNCP, Bac+5.
Le programme est proposé dans 6 campus à Bordeaux, Lille,
Lyon, Montpellier, Nantes, Paris.
3
Nos domaines de formations
Git overview and base concepts Getting started with git Working with git References
Agenda
1 Git overview and base concepts
2 Getting started with git
3 Working with git
4 References
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 2/69
Git overview and base concepts Getting started with git Working with git References
Git overview and base concepts
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 3/69
Git overview and base concepts Getting started with git Working with git References
Git presentation and history
Git presentation and history
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 4/69
Git overview and base concepts Getting started with git Working with git References
Git presentation and history
Git presentation and history
Git is a distributed revision control and source code
management system
Git is a free software created by Linus Torvalds
Git is available under the GNU GPL V2 license
Git was initialy created to host the Linux kernel sources after
the hosting on BitKeeper was abandonned
Key dates:
3 April 2005: Linus starts development
16 June 2005: release 2.6.12 of the linux kernel managed by git
26 July 2005: handover of maintenance to a major contributor
(Junio Hamano)
21 December 2005: release of v1.0 of git
28 May 2014: release of v2.0 of git
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 5/69
Git overview and base concepts Getting started with git Working with git References
Other SCMs
Other SCMs
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 6/69
Git overview and base concepts Getting started with git Working with git References
Other SCMs
Other SCMs
Centralized (client/server):
Concurrent Version System (CVS)
Subversion (svn)
Distributed:
Mercurial
GNU Bazaar
BitKeeper
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 7/69
Git overview and base concepts Getting started with git Working with git References
Distributed system benefits and drawbacks
Distributed system benefits and drawb
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 8/69
Git overview and base concepts Getting started with git Working with git References
Distributed system benefits and drawbacks
Distributed system benefits and drawbacks
Benefits:
Full history available locally
No need for network connection for usual operations
No need for manager approval for day to day usage (branch,
tag, merge ...)
There is still a reference repository
You can clone the reference repository or any existing clone
Merge system (vs. lock one)
Drawbacks:
Initial cloning can be long (full history)
No lock system (can be a problem for binaries)
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 9/69
Git overview and base concepts Getting started with git Working with git References
Data integrity control
Data integrity control
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 10/69
Git overview and base concepts Getting started with git Working with git References
Data integrity control
Data integrity control
Usage of SHA-1 hashes (same result on any machine/system
for the same content)
160 bits footprint (40 chars.)
All files are stored in .git/objects
Files are identified by an ID: fast and efficient
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 11/69
Git overview and base concepts Getting started with git Working with git References
Understanding git architecture
Understanding git architecture
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 12/69
Git overview and base concepts Getting started with git Working with git References
Understanding git architecture
Understanding git architecture: Working areas
There are basically 4 areas you have to work with:
The working directory: it holds your project files ; this is were
you make changes.
The staging area: this is were you add the snapshot of the
files you want to commit to your repository.
The local repository: this is were you commit your changes ;
this is held in the .git directory.
The remote repository: this is the reference that you use to
pull the changes made by other developpers and push your
own changes ; this repository is bare (it contains no working
copy) ; in Smile context, this will be a GitLab repository on
https://git.smile.fr/ that you access over http or ssh.
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 13/69
Git overview and base concepts Getting started with git Working with git References
Understanding git architecture
Understanding git architecture: Operations overview
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 14/69
Git overview and base concepts Getting started with git Working with git References
Getting started with git
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 15/69
Git overview and base concepts Getting started with git Working with git References
Installing git and needed tools
Installing git and needed tools
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 16/69
Git overview and base concepts Getting started with git Working with git References
Installing git and needed tools
Installing git and needed tools
Linux debian/ubuntu
apt-get install git git-svn gitk meld
Windows
msysgit
tortoiseGit
Mac
http://code.google.com/p/git-osx-installer
http://www.macports.org
sudo port install git-core +svn +doc 
+bash_completion +gitweb
Eclipse
egit
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 17/69
Git overview and base concepts Getting started with git Working with git References
Installing git and needed tools
Installing git and needed tools: Practice
Install git on your machine
Make sure the git command is available in your terminal
Check which git version is in use
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 18/69
Git overview and base concepts Getting started with git Working with git References
Getting help
Getting help
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 19/69
Git overview and base concepts Getting started with git Working with git References
Getting help
Getting help
For all sub-commands, git integrates a detailed help accessible
with:
git help <command>
All configuration variables can be inspected with a good detail
level with command:
git help config
Most commands and references can be autocompleted on the
commande line, so do not hesitate to hit the TAB key:
git [TAB] # list of commands
git cmd [TAB] # list of options
git cmd -o [TAB] # list of remotes/branches
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 20/69
Git overview and base concepts Getting started with git Working with git References
Getting help
Getting help: Practice
Look at global help
Use autocompletion with the help command (type the first
letter of a git subcommand)
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 21/69
Git overview and base concepts Getting started with git Working with git References
Telling git who you are
Telling git who you are
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 22/69
Git overview and base concepts Getting started with git Working with git References
Telling git who you are
Telling git who you are
Before you start any work in git, you must set your identity
correctly. It will be used to identify your as an author or committer:
git config --global user.name "Olivier Clavel"
git config --global user.email 
"olivier.clavel@smile.fr"
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 23/69
Git overview and base concepts Getting started with git Working with git References
Telling git who you are
Telling git who you are: Practice
Configure your full name and email
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 24/69
Git overview and base concepts Getting started with git Working with git References
Setting editors
Setting editors
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 25/69
Git overview and base concepts Getting started with git Working with git References
Setting editors
Setting editors
You can choose your favorite editor as you wish. Default is
$EDITOR (most probably vi). Examples:
git config --global core.editor nano
git config --global core.editor gedit
You should as well define your diff editor. The recommended
one is meld on linux:
git config --global merge.tool meld
For other diff editor possibilities see:
git help mergetool
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 26/69
Git overview and base concepts Getting started with git Working with git References
Setting editors
Setting editors: Practice
Set your favorite text editor
Set your favorite diff editor ; if you don’t have one, install
Meld and set it as default
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 27/69
Git overview and base concepts Getting started with git Working with git References
Colors in your terminal
Colors in your terminal
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 28/69
Git overview and base concepts Getting started with git Working with git References
Colors in your terminal
Colors in your terminal
Git can colorize most of its output in the terminal for better
readability. To globaly enable colors:
git config --global color.ui auto
For fined grained color tuning see all color.* config variables.
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 29/69
Git overview and base concepts Getting started with git Working with git References
Colors in your terminal
Colors in your terminal: Practice
Have a look at color variables in config help
Set default auto color for output
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 30/69
Git overview and base concepts Getting started with git Working with git References
Working with git
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 31/69
Git overview and base concepts Getting started with git Working with git References
Creating a local repository
Creating a local repository
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 32/69
Git overview and base concepts Getting started with git Working with git References
Creating a local repository
Creating a local repository
Initialise an empty local repository
mkdir my_project
cd my_project
git init
Clone an existing remote repository
git clone 
git@git.smile.fr/my_group/my_project.git 
my_project_local_dir
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 33/69
Git overview and base concepts Getting started with git Working with git References
Creating a local repository
Creating a local repository: Practice
Basic set up of your Gitlab account (preferences, ssh key ...)
Create a folder for today’s training
Move to that folder
Initialise a git dir from scratch and copy some files in there
Create another repo by cloning the example for today’s
training
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 34/69
Git overview and base concepts Getting started with git Working with git References
Adding files to the staging area
Adding files to the staging area
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 35/69
Git overview and base concepts Getting started with git Working with git References
Adding files to the staging area
Adding files to the staging area
Once you have modified some files in your workdir, you must add
the changes to the staging to prepare them for commit.
First have a look at what has changed:
git status
git diff
You should always over-use these commands (with options
eventually)
Add some files to the staging area:
git add [file | folder | ...] [file2 | folder2 | ...]
For partial add operations, use the patch mode:
git add -p / git add --patch
For fine tuning of add operation, use the interactive mode:
git add -i / git add --interactive
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 36/69
Git overview and base concepts Getting started with git Working with git References
Adding files to the staging area
Adding files to the staging area: Practice
Work on your own empty created repo
Examine the state of your dir
Add some more files or make some changes if needed
Add some changes to your staging area
Add an external library
Use the git add interactive and partial modes to add the
library to the index
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 37/69
Git overview and base concepts Getting started with git Working with git References
Listing differences
Listing differences
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 38/69
Git overview and base concepts Getting started with git Working with git References
Listing differences
Listing differences
See differences between your working copy and the staging
area:
git diff
See differences between your working copy + staging area and
the last commit on your branch:
git diff HEAD
See differences between your staging area and the last
commmit:
git diff --staged
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 39/69
Git overview and base concepts Getting started with git Working with git References
Listing differences
Listing differences: Practice
List differences for files you did not yet add
List differences already added to your staging area
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 40/69
Git overview and base concepts Getting started with git Working with git References
Commiting changes and viewing history
Commiting changes and viewing histo
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 41/69
Git overview and base concepts Getting started with git Working with git References
Commiting changes and viewing history
Commiting changes and viewing history
To create a new commmit with the content of the staging area,
use git commit.
With no option, it will launch your external editor to let you
write commit’s message:
git commit
Specify the message on the commmand line:
git commit -m "my commit message"
You can add all changes to the staging and commit them at
once:
git commit -a -m "my commit message"
You can modify a commit:
git commit --amend
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 42/69
Git overview and base concepts Getting started with git Working with git References
Commiting changes and viewing history
Commiting changes and viewing history
To look at history of commits, use git log.
Full default history:
git log
Show history since one minute ago:
git log -p --since="1 minute ago"
Show history of last 2 commits:
git log -p HEAD~2..HEAD
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 43/69
Git overview and base concepts Getting started with git Working with git References
Commiting changes and viewing history
Commiting changes and viewing history: Practice
Commit your staged changes
Add some more changes and commit them
Have a look at the history
Get help on git show and examine some commits with it
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 44/69
Git overview and base concepts Getting started with git Working with git References
Creating branches
Creating branches
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 45/69
Git overview and base concepts Getting started with git Working with git References
Creating branches
Creating branches
By default the repository contains the master branch
To create a dev branch based on the latest commit of the
current one:
git branch dev
To switch on the newly create branch:
git checkout dev
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 46/69
Git overview and base concepts Getting started with git Working with git References
Creating branches
Creating branches: Practice
Create a dev branch from master
Switch to dev branch
Make some changes, add, commit them
Switch back to master
List differences between master and dev branches (hint: get
help on diff)
Get help on the checkout command and figure out how to
create and switch to a branch named experimental in a
single command
Make some changes in branch experimental, commit them
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 47/69
Git overview and base concepts Getting started with git Working with git References
Merging branches
Merging branches
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 48/69
Git overview and base concepts Getting started with git Working with git References
Merging branches
Merging branches
To merge the changes from one branch into another (e.g. dev
into master):
git checkout master
git merge dev
Branches can be merged multiple times. Git keeps trace of
the merge history.
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 49/69
Git overview and base concepts Getting started with git Working with git References
Rebasing
Rebasing
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 50/69
Git overview and base concepts Getting started with git Working with git References
Rebasing
Rebasing
You can rebase one branch on the work done on another.
When you rebase, you are basically adding your work after the
one done on the other branch
git pull --rebase
git rebase master
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 51/69
Git overview and base concepts Getting started with git Working with git References
Rebasing
Merging and Rebasing: Practice
Merge dev into master and show logs
Rebase experimental on master and show logs
Merge experimental into master and show logs
Delete branch experimental (hint: git help on branch)
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 52/69
Git overview and base concepts Getting started with git Working with git References
Cherry-picking
Cherry-picking
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 53/69
Git overview and base concepts Getting started with git Working with git References
Cherry-picking
Cherry-picking
You can pick a single commit from one branch and insert it in
another:
git cherry-pick <hash>
When you cherry-pick, the original commit is patched in
current history and a new commit is done
You can compare commits between branches:
git cherry -v master dev
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 54/69
Git overview and base concepts Getting started with git Working with git References
Cherry-picking
Cherry-picking: Practice
Checkout the dev branch, make some updates and commit
them
Checkout master and list commits diff
Cherry-pick your commit from dev to master
List commits diff again
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 55/69
Git overview and base concepts Getting started with git Working with git References
Sharing work with the remote repository
Sharing work with the remote reposito
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 56/69
Git overview and base concepts Getting started with git Working with git References
Sharing work with the remote repository
Sharing work with the remote repository
If you have cloned a remote, git already has the master as a
remote tracking branch. Else you need to add the remote,
publish the branch and set it as upstream:
git remote add origin 
git@git.smile.fr:my_group/my_project.git
git push --set-upstream origin master
You proceed the same way with new branches you want to
publish and track:
git push -u origin dev
To retrieve changes pushed by others on the remote, you must
fetch them and merge them in your branch:
git pull
# or in two steps
git fetch && git merge
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 57/69
Git overview and base concepts Getting started with git Working with git References
Sharing work with the remote repository
Sharing work with the remote repository
In most cases, on long living branches, you will want to rebase
your work on the remote branch:
git pull --rebase
To rebase automatically for a specific branch each time you
pull:
git config branch.master.rebase true
git pull
To rebase automatically for all new branches (add –global to
have it permanent on the machine):
git config branch.autosetuprebase always
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 58/69
Git overview and base concepts Getting started with git Working with git References
Sharing work with the remote repository
Remote interaction: Practice
Create a training repository under your name on gitlab.
Please remember to clean it up after the training. Thanks :)
Add this new remote as origin on your local home made
repository
Push master on origin and set origin/master as remote
tracking branch
Move to the example clone repository
Config master to always rebase on upstream on pull
Push your changes (if you can)
Pull changes from others
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 59/69
Git overview and base concepts Getting started with git Working with git References
Working with tags
Working with tags
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 60/69
Git overview and base concepts Getting started with git Working with git References
Working with tags
Working with tags
Tags are used to identify a specific version of a specific
branch, typically to identify a version pushed to producion
Tags can be organised with prefixes like for folders on a disk
You can create a lightweight tag (default):
git tag production/20140116_0902 master
Or a full tag object, even with a GPG signature:
git tag -s -m "pushing release XXX to 
uat for testing" uat/20140112_1735 master
Signed tags can be verified:
git tag -v uat/20140112_1735
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 61/69
Git overview and base concepts Getting started with git Working with git References
Working with tags
Working with tags: Practice
Create some tags
Push those tags to the origin remote (hint: help push)
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 62/69
Git overview and base concepts Getting started with git Working with git References
Ignoring files
Ignoring files
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 63/69
Git overview and base concepts Getting started with git Working with git References
Ignoring files
Ignoring files
Personnal ignore file globally applied on your machine:
git config --global core.excludesfile 
/home/<USER>/.gitignore
vim /home/<USER>/.gitignore
Local and personnal ignore file for a specific repository:
vim .git/info/exclude
Local shared ignore file commited in the repository:
cd my_project
vim .gitignore
git add .gitignore
git commit -m "Ignoring y and z in project"
Those files all contain list of GLOBS file patterns to exclude
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 64/69
Git overview and base concepts Getting started with git Working with git References
Ignoring files
Ignoring files: Practice
Exclude your favourite backup extension globally for all your
git repositories
Exclude .phps locally for your current repositories
Create a cache and log directories and ignore all their
contents for anyone working on the project
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 65/69
Git overview and base concepts Getting started with git Working with git References
Going back to a previous state
Going back to a previous state
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 66/69
Git overview and base concepts Getting started with git Working with git References
Going back to a previous state
Going back to a previous state
Remove a change in staging keeping the working file
unchanged (opposite of add):
git reset -- path/to/file
Discard all changes come back to the HEAD revision in
repository:
git reset --hard HEAD
Recover a file accidentaly deleted:
# recover from HEAD revision in repository
git chekout HEAD path/to/file
# recover from staging area
git checkout -- path/to/file
Repair an error that was commited to the repository. This
creates a new commit undoing the change. In this example
only undo last commit:
git revert HEAD
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 67/69
Git overview and base concepts Getting started with git Working with git References
References
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 68/69
Git overview and base concepts Getting started with git Working with git References
References
Learn git online in 15 minutes on github:
http://try.github.io/levels/1/challenges/1
Visual git Cheatsheet:
http://ndpsoftware.com/git-cheatsheet.html
Pro Git book: http://git-scm.com/book
Git community book: http://alx.github.io/gitbook/
Git - the simple guide: http://rogerdudler.github.io/git-guide/
git-workflows for agilist:
https://github.com/stevenharman/git-workflows
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 69/69

More Related Content

What's hot

Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Ata Rehman
 
Lpi Part 1 Linux Fundamentals
Lpi Part 1 Linux FundamentalsLpi Part 1 Linux Fundamentals
Lpi Part 1 Linux FundamentalsYemenLinux
 
Raspberry zero usb in linux
Raspberry zero usb in linuxRaspberry zero usb in linux
Raspberry zero usb in linuxGSHCO
 
[ 2021 AI + X 여름 캠프 ] 1. linux 기초 & 장비 세팅
[ 2021 AI + X 여름 캠프 ] 1. linux 기초 & 장비 세팅[ 2021 AI + X 여름 캠프 ] 1. linux 기초 & 장비 세팅
[ 2021 AI + X 여름 캠프 ] 1. linux 기초 & 장비 세팅ChoiYura
 
Installing OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.xInstalling OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.xNader Karimi
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystemsAcácio Oliveira
 
Como criar um repositório Ubuntu
Como criar um repositório UbuntuComo criar um repositório Ubuntu
Como criar um repositório UbuntuCarlos Eduardo
 
From gcc to the autotools
From gcc to the autotoolsFrom gcc to the autotools
From gcc to the autotoolsThierry Gayet
 
Security Considerations on Linux Package Management
Security Considerations on Linux Package ManagementSecurity Considerations on Linux Package Management
Security Considerations on Linux Package ManagementTharindu Edirisinghe
 
FISE Integration with Python and Plone
FISE Integration with Python and PloneFISE Integration with Python and Plone
FISE Integration with Python and PloneJens Klein
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python toolsQuintagroup
 
Big Fat FastPlone - Scale up, speed up
Big Fat FastPlone - Scale up, speed upBig Fat FastPlone - Scale up, speed up
Big Fat FastPlone - Scale up, speed upJens Klein
 
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...Carlos Eduardo
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0venkatakrishnan k
 
Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commandstmavroidis
 
2.5 use rpm and yum package management
2.5 use rpm and yum package management2.5 use rpm and yum package management
2.5 use rpm and yum package managementAcácio Oliveira
 

What's hot (20)

Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
 
CPAN For Private Code
CPAN For Private CodeCPAN For Private Code
CPAN For Private Code
 
Lpi Part 1 Linux Fundamentals
Lpi Part 1 Linux FundamentalsLpi Part 1 Linux Fundamentals
Lpi Part 1 Linux Fundamentals
 
Raspberry zero usb in linux
Raspberry zero usb in linuxRaspberry zero usb in linux
Raspberry zero usb in linux
 
[ 2021 AI + X 여름 캠프 ] 1. linux 기초 & 장비 세팅
[ 2021 AI + X 여름 캠프 ] 1. linux 기초 & 장비 세팅[ 2021 AI + X 여름 캠프 ] 1. linux 기초 & 장비 세팅
[ 2021 AI + X 여름 캠프 ] 1. linux 기초 & 장비 세팅
 
Installing OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.xInstalling OpenCV 4 on Ubuntu 18.x
Installing OpenCV 4 on Ubuntu 18.x
 
101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems101 4.1 create partitions and filesystems
101 4.1 create partitions and filesystems
 
Como criar um repositório Ubuntu
Como criar um repositório UbuntuComo criar um repositório Ubuntu
Como criar um repositório Ubuntu
 
From gcc to the autotools
From gcc to the autotoolsFrom gcc to the autotools
From gcc to the autotools
 
Security Considerations on Linux Package Management
Security Considerations on Linux Package ManagementSecurity Considerations on Linux Package Management
Security Considerations on Linux Package Management
 
FISE Integration with Python and Plone
FISE Integration with Python and PloneFISE Integration with Python and Plone
FISE Integration with Python and Plone
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
 
Big Fat FastPlone - Scale up, speed up
Big Fat FastPlone - Scale up, speed upBig Fat FastPlone - Scale up, speed up
Big Fat FastPlone - Scale up, speed up
 
AtoZ about TYPO3 v8 CMS
AtoZ about TYPO3 v8 CMSAtoZ about TYPO3 v8 CMS
AtoZ about TYPO3 v8 CMS
 
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commands
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
2.5 use rpm and yum package management
2.5 use rpm and yum package management2.5 use rpm and yum package management
2.5 use rpm and yum package management
 

Similar to GIT pour développeur

Hacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersHacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersDeepikaRana30
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfuzair
 
You can git
You can gitYou can git
You can gitYu GUAN
 
Digital Fabrication Studio v.0.2: Version Control System: Files
Digital Fabrication Studio v.0.2: Version Control System: FilesDigital Fabrication Studio v.0.2: Version Control System: Files
Digital Fabrication Studio v.0.2: Version Control System: FilesMassimo Menichinelli
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticlePRIYATHAMDARISI
 
Brush up on using github
Brush up on using githubBrush up on using github
Brush up on using githubSebin Benjamin
 
Difference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs BitbucketDifference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs Bitbucketjeetendra mandal
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxAbelPhilipJoseph
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GITGhadiAlGhosh
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects InfrastructureRoy Clarkson
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects InfrastructureGunnar Hillert
 
Git 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsGit 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsIan Walls
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubScott Graham
 
Hackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we MakeHackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we Makeesben1962
 
Rc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoRc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoLuis Bertel
 

Similar to GIT pour développeur (20)

Hacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersHacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginners
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
 
Git
GitGit
Git
 
You can git
You can gitYou can git
You can git
 
Digital Fabrication Studio v.0.2: Version Control System: Files
Digital Fabrication Studio v.0.2: Version Control System: FilesDigital Fabrication Studio v.0.2: Version Control System: Files
Digital Fabrication Studio v.0.2: Version Control System: Files
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
Brush up on using github
Brush up on using githubBrush up on using github
Brush up on using github
 
Difference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs BitbucketDifference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs Bitbucket
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
 
Giddy Up on GitHub
Giddy Up on GitHubGiddy Up on GitHub
Giddy Up on GitHub
 
Git Training
Git TrainingGit Training
Git Training
 
Github
GithubGithub
Github
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects Infrastructure
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects Infrastructure
 
Open source
Open sourceOpen source
Open source
 
Git 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsGit 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizations
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHub
 
Hackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we MakeHackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we Make
 
Rc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoRc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocido
 

More from Open Source School

Strategie de Virtualisation Open Source
Strategie de Virtualisation Open SourceStrategie de Virtualisation Open Source
Strategie de Virtualisation Open SourceOpen Source School
 
LDAP : Theory and OpenLDAP implementation
LDAP : Theory and OpenLDAP implementationLDAP : Theory and OpenLDAP implementation
LDAP : Theory and OpenLDAP implementationOpen Source School
 
Monitoring : The art of knowing when and why things go wrong
Monitoring : The art of knowing when and why things go wrongMonitoring : The art of knowing when and why things go wrong
Monitoring : The art of knowing when and why things go wrongOpen Source School
 
Varnish : Advanced and high-performance HTTP caching
Varnish : Advanced and high-performance HTTP cachingVarnish : Advanced and high-performance HTTP caching
Varnish : Advanced and high-performance HTTP cachingOpen Source School
 

More from Open Source School (9)

Linux Administrateur
Linux AdministrateurLinux Administrateur
Linux Administrateur
 
Linux Scripting
Linux Scripting Linux Scripting
Linux Scripting
 
PHP & Initiation Symfony
PHP & Initiation SymfonyPHP & Initiation Symfony
PHP & Initiation Symfony
 
Strategie de Virtualisation Open Source
Strategie de Virtualisation Open SourceStrategie de Virtualisation Open Source
Strategie de Virtualisation Open Source
 
LDAP : Theory and OpenLDAP implementation
LDAP : Theory and OpenLDAP implementationLDAP : Theory and OpenLDAP implementation
LDAP : Theory and OpenLDAP implementation
 
Monitoring : The art of knowing when and why things go wrong
Monitoring : The art of knowing when and why things go wrongMonitoring : The art of knowing when and why things go wrong
Monitoring : The art of knowing when and why things go wrong
 
Redis : NoSQL key-data store
Redis : NoSQL key-data storeRedis : NoSQL key-data store
Redis : NoSQL key-data store
 
SSL : Theory and practice
SSL : Theory and practiceSSL : Theory and practice
SSL : Theory and practice
 
Varnish : Advanced and high-performance HTTP caching
Varnish : Advanced and high-performance HTTP cachingVarnish : Advanced and high-performance HTTP caching
Varnish : Advanced and high-performance HTTP caching
 

Recently uploaded

Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxEasyPrinterHelp
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfChristopherTHyatt
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKUXDXConf
 

Recently uploaded (20)

Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 

GIT pour développeur

  • 1. Git for developers Source code management with git
  • 2. 1 La 1ère école 100 % dédiée à l'open source Open Source School est fondée à l'initiative de Smile, leader de l'intégration et de l'infogérance open source, et de l'EPSI,établissement privé pionnier de l’enseignement supérieur en informatique. Dans le cadre du Programme d’Investissements d’Avenir (PIA), le gouvernement français a décidé de soutenir la création de cette école en lui attribuant une première aide de 1,4M€ et confirme sa volonté de soutenir la filière du Logiciel Libre actuellement en plein développement. Avec une croissance annuelle de plus de 10%, et 4 000 postes vacants chaque année dans le secteur du Logiciel Libre, OSS entend répondre à la pénurie de compétences du secteur en mobilisant l’ensemble de l’écosystème et en proposant la plus vaste offre en matière de formation aux technologies open source tant en formation initiale qu'en formation continue.
  • 3. 2 Les formations du plein emploi !  Formation Continue Open Source School "Executive Education" est un organisme de formation qui propose un catalogue de plus de 200 formations professionnelles et différents dispositifs de reconversion permettant le retour à l’emploi (POE) ou une meilleure employabilité pour de nombreux professionnels de l’informatique.  Pour vos demandes : formations@opensourceschool.fr  Formation Initiale 100% logiciels libres et 100% alternance, le cursus Open Source School s’appuie sur le référentiel des blocs de compétences de l’EPSI. Il est sanctionné par un titre de niveau I RNCP, Bac+5. Le programme est proposé dans 6 campus à Bordeaux, Lille, Lyon, Montpellier, Nantes, Paris.
  • 4. 3 Nos domaines de formations
  • 5. Git overview and base concepts Getting started with git Working with git References Agenda 1 Git overview and base concepts 2 Getting started with git 3 Working with git 4 References www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 2/69
  • 6. Git overview and base concepts Getting started with git Working with git References Git overview and base concepts www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 3/69
  • 7. Git overview and base concepts Getting started with git Working with git References Git presentation and history Git presentation and history www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 4/69
  • 8. Git overview and base concepts Getting started with git Working with git References Git presentation and history Git presentation and history Git is a distributed revision control and source code management system Git is a free software created by Linus Torvalds Git is available under the GNU GPL V2 license Git was initialy created to host the Linux kernel sources after the hosting on BitKeeper was abandonned Key dates: 3 April 2005: Linus starts development 16 June 2005: release 2.6.12 of the linux kernel managed by git 26 July 2005: handover of maintenance to a major contributor (Junio Hamano) 21 December 2005: release of v1.0 of git 28 May 2014: release of v2.0 of git www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 5/69
  • 9. Git overview and base concepts Getting started with git Working with git References Other SCMs Other SCMs www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 6/69
  • 10. Git overview and base concepts Getting started with git Working with git References Other SCMs Other SCMs Centralized (client/server): Concurrent Version System (CVS) Subversion (svn) Distributed: Mercurial GNU Bazaar BitKeeper www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 7/69
  • 11. Git overview and base concepts Getting started with git Working with git References Distributed system benefits and drawbacks Distributed system benefits and drawb www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 8/69
  • 12. Git overview and base concepts Getting started with git Working with git References Distributed system benefits and drawbacks Distributed system benefits and drawbacks Benefits: Full history available locally No need for network connection for usual operations No need for manager approval for day to day usage (branch, tag, merge ...) There is still a reference repository You can clone the reference repository or any existing clone Merge system (vs. lock one) Drawbacks: Initial cloning can be long (full history) No lock system (can be a problem for binaries) www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 9/69
  • 13. Git overview and base concepts Getting started with git Working with git References Data integrity control Data integrity control www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 10/69
  • 14. Git overview and base concepts Getting started with git Working with git References Data integrity control Data integrity control Usage of SHA-1 hashes (same result on any machine/system for the same content) 160 bits footprint (40 chars.) All files are stored in .git/objects Files are identified by an ID: fast and efficient www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 11/69
  • 15. Git overview and base concepts Getting started with git Working with git References Understanding git architecture Understanding git architecture www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 12/69
  • 16. Git overview and base concepts Getting started with git Working with git References Understanding git architecture Understanding git architecture: Working areas There are basically 4 areas you have to work with: The working directory: it holds your project files ; this is were you make changes. The staging area: this is were you add the snapshot of the files you want to commit to your repository. The local repository: this is were you commit your changes ; this is held in the .git directory. The remote repository: this is the reference that you use to pull the changes made by other developpers and push your own changes ; this repository is bare (it contains no working copy) ; in Smile context, this will be a GitLab repository on https://git.smile.fr/ that you access over http or ssh. www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 13/69
  • 17. Git overview and base concepts Getting started with git Working with git References Understanding git architecture Understanding git architecture: Operations overview www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 14/69
  • 18. Git overview and base concepts Getting started with git Working with git References Getting started with git www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 15/69
  • 19. Git overview and base concepts Getting started with git Working with git References Installing git and needed tools Installing git and needed tools www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 16/69
  • 20. Git overview and base concepts Getting started with git Working with git References Installing git and needed tools Installing git and needed tools Linux debian/ubuntu apt-get install git git-svn gitk meld Windows msysgit tortoiseGit Mac http://code.google.com/p/git-osx-installer http://www.macports.org sudo port install git-core +svn +doc +bash_completion +gitweb Eclipse egit www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 17/69
  • 21. Git overview and base concepts Getting started with git Working with git References Installing git and needed tools Installing git and needed tools: Practice Install git on your machine Make sure the git command is available in your terminal Check which git version is in use www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 18/69
  • 22. Git overview and base concepts Getting started with git Working with git References Getting help Getting help www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 19/69
  • 23. Git overview and base concepts Getting started with git Working with git References Getting help Getting help For all sub-commands, git integrates a detailed help accessible with: git help <command> All configuration variables can be inspected with a good detail level with command: git help config Most commands and references can be autocompleted on the commande line, so do not hesitate to hit the TAB key: git [TAB] # list of commands git cmd [TAB] # list of options git cmd -o [TAB] # list of remotes/branches www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 20/69
  • 24. Git overview and base concepts Getting started with git Working with git References Getting help Getting help: Practice Look at global help Use autocompletion with the help command (type the first letter of a git subcommand) www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 21/69
  • 25. Git overview and base concepts Getting started with git Working with git References Telling git who you are Telling git who you are www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 22/69
  • 26. Git overview and base concepts Getting started with git Working with git References Telling git who you are Telling git who you are Before you start any work in git, you must set your identity correctly. It will be used to identify your as an author or committer: git config --global user.name "Olivier Clavel" git config --global user.email "olivier.clavel@smile.fr" www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 23/69
  • 27. Git overview and base concepts Getting started with git Working with git References Telling git who you are Telling git who you are: Practice Configure your full name and email www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 24/69
  • 28. Git overview and base concepts Getting started with git Working with git References Setting editors Setting editors www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 25/69
  • 29. Git overview and base concepts Getting started with git Working with git References Setting editors Setting editors You can choose your favorite editor as you wish. Default is $EDITOR (most probably vi). Examples: git config --global core.editor nano git config --global core.editor gedit You should as well define your diff editor. The recommended one is meld on linux: git config --global merge.tool meld For other diff editor possibilities see: git help mergetool www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 26/69
  • 30. Git overview and base concepts Getting started with git Working with git References Setting editors Setting editors: Practice Set your favorite text editor Set your favorite diff editor ; if you don’t have one, install Meld and set it as default www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 27/69
  • 31. Git overview and base concepts Getting started with git Working with git References Colors in your terminal Colors in your terminal www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 28/69
  • 32. Git overview and base concepts Getting started with git Working with git References Colors in your terminal Colors in your terminal Git can colorize most of its output in the terminal for better readability. To globaly enable colors: git config --global color.ui auto For fined grained color tuning see all color.* config variables. www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 29/69
  • 33. Git overview and base concepts Getting started with git Working with git References Colors in your terminal Colors in your terminal: Practice Have a look at color variables in config help Set default auto color for output www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 30/69
  • 34. Git overview and base concepts Getting started with git Working with git References Working with git www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 31/69
  • 35. Git overview and base concepts Getting started with git Working with git References Creating a local repository Creating a local repository www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 32/69
  • 36. Git overview and base concepts Getting started with git Working with git References Creating a local repository Creating a local repository Initialise an empty local repository mkdir my_project cd my_project git init Clone an existing remote repository git clone git@git.smile.fr/my_group/my_project.git my_project_local_dir www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 33/69
  • 37. Git overview and base concepts Getting started with git Working with git References Creating a local repository Creating a local repository: Practice Basic set up of your Gitlab account (preferences, ssh key ...) Create a folder for today’s training Move to that folder Initialise a git dir from scratch and copy some files in there Create another repo by cloning the example for today’s training www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 34/69
  • 38. Git overview and base concepts Getting started with git Working with git References Adding files to the staging area Adding files to the staging area www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 35/69
  • 39. Git overview and base concepts Getting started with git Working with git References Adding files to the staging area Adding files to the staging area Once you have modified some files in your workdir, you must add the changes to the staging to prepare them for commit. First have a look at what has changed: git status git diff You should always over-use these commands (with options eventually) Add some files to the staging area: git add [file | folder | ...] [file2 | folder2 | ...] For partial add operations, use the patch mode: git add -p / git add --patch For fine tuning of add operation, use the interactive mode: git add -i / git add --interactive www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 36/69
  • 40. Git overview and base concepts Getting started with git Working with git References Adding files to the staging area Adding files to the staging area: Practice Work on your own empty created repo Examine the state of your dir Add some more files or make some changes if needed Add some changes to your staging area Add an external library Use the git add interactive and partial modes to add the library to the index www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 37/69
  • 41. Git overview and base concepts Getting started with git Working with git References Listing differences Listing differences www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 38/69
  • 42. Git overview and base concepts Getting started with git Working with git References Listing differences Listing differences See differences between your working copy and the staging area: git diff See differences between your working copy + staging area and the last commit on your branch: git diff HEAD See differences between your staging area and the last commmit: git diff --staged www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 39/69
  • 43. Git overview and base concepts Getting started with git Working with git References Listing differences Listing differences: Practice List differences for files you did not yet add List differences already added to your staging area www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 40/69
  • 44. Git overview and base concepts Getting started with git Working with git References Commiting changes and viewing history Commiting changes and viewing histo www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 41/69
  • 45. Git overview and base concepts Getting started with git Working with git References Commiting changes and viewing history Commiting changes and viewing history To create a new commmit with the content of the staging area, use git commit. With no option, it will launch your external editor to let you write commit’s message: git commit Specify the message on the commmand line: git commit -m "my commit message" You can add all changes to the staging and commit them at once: git commit -a -m "my commit message" You can modify a commit: git commit --amend www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 42/69
  • 46. Git overview and base concepts Getting started with git Working with git References Commiting changes and viewing history Commiting changes and viewing history To look at history of commits, use git log. Full default history: git log Show history since one minute ago: git log -p --since="1 minute ago" Show history of last 2 commits: git log -p HEAD~2..HEAD www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 43/69
  • 47. Git overview and base concepts Getting started with git Working with git References Commiting changes and viewing history Commiting changes and viewing history: Practice Commit your staged changes Add some more changes and commit them Have a look at the history Get help on git show and examine some commits with it www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 44/69
  • 48. Git overview and base concepts Getting started with git Working with git References Creating branches Creating branches www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 45/69
  • 49. Git overview and base concepts Getting started with git Working with git References Creating branches Creating branches By default the repository contains the master branch To create a dev branch based on the latest commit of the current one: git branch dev To switch on the newly create branch: git checkout dev www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 46/69
  • 50. Git overview and base concepts Getting started with git Working with git References Creating branches Creating branches: Practice Create a dev branch from master Switch to dev branch Make some changes, add, commit them Switch back to master List differences between master and dev branches (hint: get help on diff) Get help on the checkout command and figure out how to create and switch to a branch named experimental in a single command Make some changes in branch experimental, commit them www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 47/69
  • 51. Git overview and base concepts Getting started with git Working with git References Merging branches Merging branches www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 48/69
  • 52. Git overview and base concepts Getting started with git Working with git References Merging branches Merging branches To merge the changes from one branch into another (e.g. dev into master): git checkout master git merge dev Branches can be merged multiple times. Git keeps trace of the merge history. www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 49/69
  • 53. Git overview and base concepts Getting started with git Working with git References Rebasing Rebasing www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 50/69
  • 54. Git overview and base concepts Getting started with git Working with git References Rebasing Rebasing You can rebase one branch on the work done on another. When you rebase, you are basically adding your work after the one done on the other branch git pull --rebase git rebase master www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 51/69
  • 55. Git overview and base concepts Getting started with git Working with git References Rebasing Merging and Rebasing: Practice Merge dev into master and show logs Rebase experimental on master and show logs Merge experimental into master and show logs Delete branch experimental (hint: git help on branch) www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 52/69
  • 56. Git overview and base concepts Getting started with git Working with git References Cherry-picking Cherry-picking www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 53/69
  • 57. Git overview and base concepts Getting started with git Working with git References Cherry-picking Cherry-picking You can pick a single commit from one branch and insert it in another: git cherry-pick <hash> When you cherry-pick, the original commit is patched in current history and a new commit is done You can compare commits between branches: git cherry -v master dev www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 54/69
  • 58. Git overview and base concepts Getting started with git Working with git References Cherry-picking Cherry-picking: Practice Checkout the dev branch, make some updates and commit them Checkout master and list commits diff Cherry-pick your commit from dev to master List commits diff again www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 55/69
  • 59. Git overview and base concepts Getting started with git Working with git References Sharing work with the remote repository Sharing work with the remote reposito www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 56/69
  • 60. Git overview and base concepts Getting started with git Working with git References Sharing work with the remote repository Sharing work with the remote repository If you have cloned a remote, git already has the master as a remote tracking branch. Else you need to add the remote, publish the branch and set it as upstream: git remote add origin git@git.smile.fr:my_group/my_project.git git push --set-upstream origin master You proceed the same way with new branches you want to publish and track: git push -u origin dev To retrieve changes pushed by others on the remote, you must fetch them and merge them in your branch: git pull # or in two steps git fetch && git merge www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 57/69
  • 61. Git overview and base concepts Getting started with git Working with git References Sharing work with the remote repository Sharing work with the remote repository In most cases, on long living branches, you will want to rebase your work on the remote branch: git pull --rebase To rebase automatically for a specific branch each time you pull: git config branch.master.rebase true git pull To rebase automatically for all new branches (add –global to have it permanent on the machine): git config branch.autosetuprebase always www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 58/69
  • 62. Git overview and base concepts Getting started with git Working with git References Sharing work with the remote repository Remote interaction: Practice Create a training repository under your name on gitlab. Please remember to clean it up after the training. Thanks :) Add this new remote as origin on your local home made repository Push master on origin and set origin/master as remote tracking branch Move to the example clone repository Config master to always rebase on upstream on pull Push your changes (if you can) Pull changes from others www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 59/69
  • 63. Git overview and base concepts Getting started with git Working with git References Working with tags Working with tags www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 60/69
  • 64. Git overview and base concepts Getting started with git Working with git References Working with tags Working with tags Tags are used to identify a specific version of a specific branch, typically to identify a version pushed to producion Tags can be organised with prefixes like for folders on a disk You can create a lightweight tag (default): git tag production/20140116_0902 master Or a full tag object, even with a GPG signature: git tag -s -m "pushing release XXX to uat for testing" uat/20140112_1735 master Signed tags can be verified: git tag -v uat/20140112_1735 www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 61/69
  • 65. Git overview and base concepts Getting started with git Working with git References Working with tags Working with tags: Practice Create some tags Push those tags to the origin remote (hint: help push) www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 62/69
  • 66. Git overview and base concepts Getting started with git Working with git References Ignoring files Ignoring files www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 63/69
  • 67. Git overview and base concepts Getting started with git Working with git References Ignoring files Ignoring files Personnal ignore file globally applied on your machine: git config --global core.excludesfile /home/<USER>/.gitignore vim /home/<USER>/.gitignore Local and personnal ignore file for a specific repository: vim .git/info/exclude Local shared ignore file commited in the repository: cd my_project vim .gitignore git add .gitignore git commit -m "Ignoring y and z in project" Those files all contain list of GLOBS file patterns to exclude www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 64/69
  • 68. Git overview and base concepts Getting started with git Working with git References Ignoring files Ignoring files: Practice Exclude your favourite backup extension globally for all your git repositories Exclude .phps locally for your current repositories Create a cache and log directories and ignore all their contents for anyone working on the project www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 65/69
  • 69. Git overview and base concepts Getting started with git Working with git References Going back to a previous state Going back to a previous state www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 66/69
  • 70. Git overview and base concepts Getting started with git Working with git References Going back to a previous state Going back to a previous state Remove a change in staging keeping the working file unchanged (opposite of add): git reset -- path/to/file Discard all changes come back to the HEAD revision in repository: git reset --hard HEAD Recover a file accidentaly deleted: # recover from HEAD revision in repository git chekout HEAD path/to/file # recover from staging area git checkout -- path/to/file Repair an error that was commited to the repository. This creates a new commit undoing the change. In this example only undo last commit: git revert HEAD www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 67/69
  • 71. Git overview and base concepts Getting started with git Working with git References References www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 68/69
  • 72. Git overview and base concepts Getting started with git Working with git References References Learn git online in 15 minutes on github: http://try.github.io/levels/1/challenges/1 Visual git Cheatsheet: http://ndpsoftware.com/git-cheatsheet.html Pro Git book: http://git-scm.com/book Git community book: http://alx.github.io/gitbook/ Git - the simple guide: http://rogerdudler.github.io/git-guide/ git-workflows for agilist: https://github.com/stevenharman/git-workflows www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 69/69