SlideShare a Scribd company logo
Git
AN INTRODUCTION
Introduction to Git as a version control system:
concepts, main features and practical aspects.
How do you share and save data?
• “I’m working solo… and I only have one
computer”
3/13/2015 Version Control with Git 2
What I need:
- backup;
- different saved versions;
- early and frequently
saving.
What I can use:
- external hard drives;
- dedicated folder;
- Dropbox folder;
- …
How do you share and save data?
• “I’m working solo… and I only have one
computer”
3/13/2015 Version Control with Git 3
What if…
- … I forget to save a specific version
and then I need it?
- … I delete/loose a previous version?
How do you share and save data?
• “I’m working solo… and I have more than one
computer”
3/13/2015 Version Control with Git 4
What I need:
- backup;
- different saved versions;
- early and frequently saving;
- conventions on file names.
What I can use:
- USB memory sticks;
- external hard drives;
- Dropbox folder;
- shared folder;
- …
How do you share and save data?
• “I’m working solo… and I have more than one
computer”
3/13/2015 Version Control with Git 5
What if…
- … I forget to save a specific version
and then I need it?
- … I delete/loose a previous version?
- … I have different projects in the
“shared” workspace?
- … I forget to copy one version
between computers?
How do you share and save data?
• “I’m working in team”
3/13/2015 Version Control with Git 6
What I need:
- backup;
- different saved versions;
- early and frequently saving;
- shared conventions on file
names.
What I can use:
- USB memory sticks;
- external hard drives;
- Dropbox folder;
- e-mails;
- …
How do you share and save data?
• “I’m working in team”
3/13/2015 Version Control with Git 7
Other issues:
- who has the latest version?
- who has the right to edit?
- how to ensure that everyone
sees up-to-date versions of
everything?
- how to handle conflicts?
What if…
- … a team member forgets to save a
specific version and then someone
else needs it?
- … someone deletes/looses a version?
- … someone forgets to share a specific
version of the projects?
Version Control Systems
Three generations:
1. Local (RCS, SCCS)
2. Centralized (CVS, Subversion, Team Foundation
Server)
3. Distributed (Git, Mercurial)
3/13/2015 Version Control with Git 8
Record changes to a file or a set of files over time so that
you can recall specific versions later
NOW
Basic Concepts
Repository
– place where you store all your
work
– contains every version of your work that has ever
existed
• files
• directories layout
• history
– can be shared by the whole team
3/13/2015 Version Control with Git 9
Basic Concepts
Working copy
– a snapshot of the repository used
for… working
– the place where changes happens
– private, not shared by the team
– it also contains some metadata so that it can keep
track of the state of things
• has a file been modified?
• is this file new?
• has a file been deleted?
3/13/2015 Version Control with Git 10
Basic Concepts
Commit
– the operation that
modifies the repository
– atomically performed by modern version control
tools
• the integrity of the repository is assured
– it is typical to provide a log message (or comment)
when you commit
• to explain the changes you have made
• the message becomes part of the history of the repository
3/13/2015 Version Control with Git 11
Basic Concepts
Update
– update the working copy
with respect to the
repository
• apply changes from the repository
• merge such changes with the ones you have made to your
working copy, if necessary
3/13/2015 Version Control with Git 12
Centralized Version Control
• one central repository
• client-server relationship
3/13/2015 Version Control with Git 13
Distributed Version Control
• clients and server have the full copy of the repository
– local repositories clone a remote repository
• it is possible to have more than one server
3/13/2015 Version Control with Git 14
More Basic Concepts
Push
– copy changesets from a
local repository instance
to a remote one
• synchronization between two repository instances
3/13/2015 Version Control with Git 15
More Basic Concepts
Pull
– copy changesets from a
remote repository
instance to a local one
• synchronization between two repository instances
3/13/2015 Version Control with Git 16
Introducing… Git
• Distributed Version Control System
• Born
– on 2005 for the Linux kernel project
– to be used via command line
• Website: http://git-scm.com
• Highlights:
– free and open source
– strong support for non-linear development
– fully distributed
– efficient handling of large projects
– cryptographic authentication of history
3/13/2015 Version Control with Git 17
Who uses Git?
3/13/2015 Version Control with Git 18
Getting started with Git
• Standard installations
– http://git-scm.com/downloads
• Available for all the platform
• Git Graphical Applications
– http://git-scm.com/downloads/guis
• For this course, Git is
– included in RailsInstaller
– integrated in RubyMine
3/13/2015 Version Control with Git 19
Installing Git
• Windows
– download and install Git from http://git-
scm.com/downloads
• Linux
– check if it is already installed
• open a terminal and type “git”
– otherwise, install it from your package manager or via
http://git-scm.com/downloads
• Mac
– check if it is already installed
• open a terminal and type “git”
– otherwise, install it from http://git-scm.com/downloads
3/13/2015 Version Control with Git 20
Git by Example
Marco and Dave work for the same company, but
in two different countries.
They have to realize a new software project, so
they decided to make it in Ruby and to use Git for
version control.
3/13/2015 Version Control with Git 21
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
Marco starts the project by creating a new Git
repository on the central server.
He goes into the project directory and types:
to initialize an empty Git repository for the project.
3/13/2015 Version Control with Git 22
git init --bare myproject.git
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
When the central repository is ready, Dave create
a folder named myproject on his computer and
initializes a repository in it:
3/13/2015 Version Control with Git 23
git init
Git by Example
• initializes an empty Git repository inside an
existing folder
• creates a .git directory inside it
• without parameters, typically
– on the server, it is used with the --bare parameter
3/13/2015 Version Control with Git 24
git init
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
Dave writes some code in the myproject folder.
Before committing, Dave needs to really put the
created file under version control, by adding the
file to the Staging area:
3/13/2015 Version Control with Git 25
git add main.rb
The Staging Area
• A sort of loading dock
• It can contain things that are neither in the working
copy nor in the repository instance
• Also called “index”
3/13/2015 Version Control with Git 26
STAGING AREA
The Staging Area: an example
• Imagine to modify an existing file in the working
copy
• The file is marked as “modified”
3/13/2015 Version Control with Git 27
STAGING AREA
The Staging Area: an example
• Before committing, the modified file needs to be
“staged”
– i.e., add a snapshot of it in the staging area
• Modified data has been marked in its current version to
go into the next commit snapshot
3/13/2015 Version Control with Git 28
STAGING AREA
ADD
The Staging Area: an example
• Then, changes can be “committed”
– i.e., take the file from the staging area and store
permanently the snapshot in the local repository
3/13/2015 Version Control with Git 29
STAGING AREA
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
If Dave wants permanently to exclude from
version control some files in the project folder, he
can add them in the .gitignore file
– such files and folders will not be staged
3/13/2015 Version Control with Git 30
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
After adding main.rb to the Staging area, Dave
can commit the file to the local repository:
3/13/2015 Version Control with Git 31
git commit -m “initial commit”
Git by Example
• store the current snapshot in the local
repository
• -m “put a message here”
– perform the commit with a log message
– useful to know what you have committed
• - a
– a useful parameter
– it performs an add for modified files, too
• useless at this point
3/13/2015 Version Control with Git 32
git commit -m “initial commit”
Git by Example
Dave is ready to load the data to the remote
repository. He has to specify what is the remote
server to use:
3/13/2015 Version Control with Git 33
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
git remote add origin http://centralserver.com/myproject.git
Git by Example
• add a new remote repository
– multiple remotes can exists
• for each remote, a name and an address is
specified
– origin is the “standard” name for indicating the
principal remote
– the address can be in the format http(s):// or git://
• remotes can also be removed, renamed, etc.
3/13/2015 Version Control with Git 34
git remote add origin http://centralserver.com/myproject.git
Git by Example
Now Dave can push the data to the remote
repository:
where origin is the remote name and master is the
default branch name
3/13/2015 Version Control with Git 35
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
git push -u origin master
Git by Example
• Git pushes only to matching branches
– for every branch that exists on the local side, the remote
side is updated if a branch of the same name already
exists there
• this behavior will change with Git 2.0
– you have to push the branch explicitly the first time
• -u
– set other information useful for other commands (e.g.,
pull)
• After the first time, you can simply use:
– git push
3/13/2015 Version Control with Git 36
git push -u origin master
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
Marco starts working on the project and clones the
remote repository on his computer:
Now Marco has the code!
3/13/2015 Version Control with Git 37
git clone http://centralserver.com/myproject.git
Git by Example
• creates a directory named myproject
• initializes a .git directory inside it
• pulls down all the data for that repository
• checks out a working copy of the latest version
If you want to clone the repository into a
directory with another name, you can specify that
as:
3/13/2015 Version Control with Git 38
git clone http://centralserver.com/myproject.git
git clone http://centralserver.com/myproject.git first_project
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
Marco wants to see the details of what Dave did:
The result will be something like:
3/13/2015 Version Control with Git 39
git log
commit bcb39bee268a92a6d2930cc8a27ec3402ebecf0d
Author: Dave <dave@email.co.uk>
Date: Wed Mar 12 10:06:13 2015
initial commit
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
Marco wants to see the details of what Dave did:
The result will be something like:
3/13/2015 Version Control with Git 40
git log
commit bcb39bee268a92a6d2930cc8a27ec3402ebecf0d
Author: Dave <dave@email.co.uk>
Date: Wed Mar 12 10:06:13 2015
initial commit
bcb39bee268a92a6d2930cc8a27ec3402ebecf0d
SHA-1 hash for data integrity
Git by Example
• At this point, Marco edits the source code and
saves
• To see the pending changes, he can use:
– git status
• To see the difference between his version and
the previous one, he can use:
– git diff (--cached, to include staged files)
• Marco decides to commit and to push his work
3/13/2015 Version Control with Git 41
git commit -a -m “added new functionalities”
git push
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
Meanwhile, Dave found some bugs in the code.
He looks for update on the central server and get
it (if any):
3/13/2015 Version Control with Git 42
git pull
Pull and Fetch in Git
Fetch
– copy changesets from a
remote repository
instance to a local one
– previously, we called it “pull”
Pull
– perform fetch
– update the working copy
3/13/2015 Version Control with Git 43
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
However, no new data is available since Marco
has not yet pushed his changes.
So, Dave fixes the bugs, and commits:
3/13/2015 Version Control with Git 44
git commit -a -m “bug fixing”
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
After some time, Dave tries to push his changes
but something goes wrong
3/13/2015 Version Control with Git 45
git push
To http://centralserver.com/myproject
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘http://centralserver.com/myproject’
Git by Example
• What happens?
– Git is not allowing Dave to push his changes because
Marco has already pushed something to the master
branch
• Solution:
– Dave has to do a pull, to bring in changes before
pushing his modifications
• Two possible scenarios:
– merging of files goes smoothly;
– merging of files generates conflicts.
3/13/2015 Version Control with Git 46
Git by Example
• Merge with conflicts
• Git includes both Marco’s code and Dave’s code
with conflict markers to delimit things
3/13/2015 Version Control with Git 47
From http://centralserver.com/myproject
b19f36c..b77378f master -> origin/master
Auto-merging main.rb
CONFLICT (content): Merge conflict in main.rb
Automatic merge failed; fix conflicts and then commit the result.
<<<<<<< HEAD
# Marco’s code here
=======
# Dave’s code here
>>>>>>> b77378f6eb0af44468be36a085c3fe06a80e0322
SOMEWHERE IN THE USA
MARCO, ITALY DAVE, ENGLAND
Git by Example
After (manually) resolving these conflicts, Dave is
able to push the changes:
3/13/2015 Version Control with Git 48
git push
Other Useful Commands
• Operations on files
– Remove: git rm [filename]
– Move/rename: git mv [file-from] [file-to]
– Unstage some staged files: git reset HEAD [filename-
list]
– Unmodify a modified file: git checkout -- [filename]
• Change the last commit
– git commit --amend
3/13/2015 Version Control with Git 49
Other Useful Commands
• Operations on remotes
– List: git remote (-v, to show the URLs)
– Add: git remote add [shortname] [url]
– Inspect: git remote show [remote-name]
– Rename: git remote rename [old-name] [new-name]
– Remove: git remote rm [remote-name]
3/13/2015 Version Control with Git 50
Tags and Branches in a Nutshell
• Local and remote
• Do not push automatically
[Image from http://nvie.com/posts/a-successful-git-branching-model/]
3/13/2015 Version Control with Git 51
Tags… in brief
• useful to mark release points
• two types:
– lightweight
– annotated (more complete)
• commands:
– git tag, shows the available existing tags
– git tag [tag-name], creates a lightweight tag
– git tag -a [tag-name] -m [message]‚ creates an
annotated tag
– tag show [tag-name], shows the tag data
3/13/2015 Version Control with Git 52
Branches… in brief
• used to develop features isolated from each other
• the master branch is the “default” branch when you
create a repository
– you should use other branches for development and
merge them back to the master branch upon completion
• really lightweight in Git
• commands:
– git branch [branch-name], create a new branch
– git branch, lists all existing branches
– git checkout [branch-name], switches to the selected
branch
– git branch -d [branch-name], removes the selected branch
3/13/2015 Version Control with Git 53
Hosted Git
• To have (at least) one remote repository
– alternative: set up your own Git server!
• Most popular:
– GitHub, https://github.com/
– Bitbucket, https://bitbucket.org/
– Sourceforge, http://sourceforge.net/
– CodePlex (by Microsoft), https://www.codeplex.com/
3/13/2015 Version Control with Git 54
GitHub
• Slightly different than other code-hosting sites
– instead of being primarily based on the project, it is
user-centric
– social coding
• A commercial company
– charges for accounts that maintain private repository
– free account to host as many open source project as
you want
– free Micro plan for students
• 5 private repositories, unlimited public repositories
• https://education.github.com
3/13/2015 Version Control with Git 55
Bitbucket
• Similar to GitHub
• Less used than GitHub, right now
• Mercurial support
• A commercial company
– free private and public repositories for small team
(up to 5 private collaborators)
– charges for project involving bigger team
– free for academia (also for students)
• unlimited public and private repositories
• unlimited users for single projects
3/13/2015 Version Control with Git 56
GitHub Pages
• Website for your (GitHub) repository
– https://pages.github.com/
• We will use it for hosting your project
documentation
– everything realized in Modulo B
– your website will be reachable from
http://lam-2015.github.io/your-project-name
• FAQ
– https://help.github.com/categories/github-pages-
basics/
3/13/2015 Version Control with Git 57
Homework(s)
• Create a personal GitHub account
– you can also ask for a “student discount” at
https://education.github.com
– we will require your username to set up your team
repositories for final projects
• Try Git!
– http://try.github.io/
– 15 minutes tutorial
3/13/2015 Version Control with Git 58
References
• Git Reference
– http://gitref.org/
• Git - the simple guide
– http://rogerdudler.github.io/git-guide/
• Git Documentation
– http://git-scm.com/docs
• Pro Git (online book)
– http://git-scm.com/book
• Version Control by Example (online book)
– http://www.ericsink.com/vcbe/
3/13/2015 Version Control with Git 59
References
• Try Git!
– http://try.github.io/
• Various Git resources
– https://help.github.com/articles/what-are-other-good-
resources-for-learning-git-and-github
• A successful Git branching model
– http://nvie.com/posts/a-successful-git-branching-model/
• Some Git (graphical) clients
– http://git-scm.com/downloads/guis
• EGit, Eclipse plugin for Git
– http://www.eclipse.org/egit/
3/13/2015 Version Control with Git 60
Questions?
02NPYPD LINGUAGGI E AMBIENTI MULTIMEDIALI
Luigi De Russis
luigi.derussis@polito.it
License
• This work is licensed under the Creative Commons “Attribution-
NonCommercial-ShareAlike Unported (CC BY-NC-SA 3,0)” License.
• You are free:
– to Share - to copy, distribute and transmit the work
– to Remix - to adapt the work
• Under the following conditions:
– Attribution - You must attribute the work in the manner specified by the
author or licensor (but not in any way that suggests that they endorse you
or your use of the work).
– Noncommercial - You may not use this work for commercial purposes.
– Share Alike - If you alter, transform, or build upon this work, you may
distribute the resulting work only under the same or similar license to this
one.
• To view a copy of this license, visit
http://creativecommons.org/license/by-nc-sa/3.0/
3/13/2015 Version Control with Git 62

More Related Content

What's hot

GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
Introduction git
Introduction gitIntroduction git
Introduction git
Dian Sigit Prastowo
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
KMS Technology
 
Version control system
Version control systemVersion control system
Version control system
Aryman Gautam
 
Git basics
Git basicsGit basics
Git basics
GHARSALLAH Mohamed
 
Github basics
Github basicsGithub basics
Github basics
Radoslav Georgiev
 
Version control
Version controlVersion control
Version control
visual28
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
Nick Quaranto
 
Git Rebase vs Merge
Git Rebase vs MergeGit Rebase vs Merge
Git Rebase vs Merge
Mariam Hakobyan
 
Git training v10
Git training v10Git training v10
Git training v10
Skander Hamza
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
Sébastien Saunier
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
Gaurav Wable
 
Version Control System
Version Control SystemVersion Control System
Version Control System
guptaanil
 
git and github
git and githubgit and github
git and github
Darren Oakley
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
Noa Harel
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
Senthilkumar Gopal
 
Version control system and Git
Version control system and GitVersion control system and Git
Version control system and Git
ramubonkuri
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
Venkat Malladi
 
Git commands
Git commandsGit commands
Git commands
Viyaan Jhiingade
 

What's hot (20)

GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Version control system
Version control systemVersion control system
Version control system
 
Git basics
Git basicsGit basics
Git basics
 
Github basics
Github basicsGithub basics
Github basics
 
Version control
Version controlVersion control
Version control
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Git Rebase vs Merge
Git Rebase vs MergeGit Rebase vs Merge
Git Rebase vs Merge
 
Git training v10
Git training v10Git training v10
Git training v10
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Version Control System
Version Control SystemVersion Control System
Version Control System
 
git and github
git and githubgit and github
git and github
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Version control system and Git
Version control system and GitVersion control system and Git
Version control system and Git
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Git commands
Git commandsGit commands
Git commands
 

Viewers also liked

Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)
Luigi De Russis
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
Luigi De Russis
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
Luigi De Russis
 
AmI 2016 - Python basics
AmI 2016 - Python basicsAmI 2016 - Python basics
AmI 2016 - Python basics
Luigi De Russis
 
Continuous integration with teamcity
Continuous integration with teamcityContinuous integration with teamcity
Continuous integration with teamcityEugene Sheretov
 
360 Company Analysis Infographic
360 Company Analysis Infographic360 Company Analysis Infographic
360 Company Analysis Infographic
George Sloane
 
[英語] 小学校3年生外国語活動 年間指導計画例 [四万十市素案]
[英語] 小学校3年生外国語活動 年間指導計画例 [四万十市素案][英語] 小学校3年生外国語活動 年間指導計画例 [四万十市素案]
[英語] 小学校3年生外国語活動 年間指導計画例 [四万十市素案]
William Dyer
 
"Pizza with the Pros" at Heartland CC 28MAR17
"Pizza with the Pros" at Heartland CC 28MAR17"Pizza with the Pros" at Heartland CC 28MAR17
"Pizza with the Pros" at Heartland CC 28MAR17
CBCT Magazine
 
Branding e Psicologia del Colore
Branding e Psicologia del ColoreBranding e Psicologia del Colore
Branding e Psicologia del Colore
Andrea Riezzo
 
UV LED
UV LEDUV LED
UV LED
raven luo
 
Oportunidad de negocios en la distribución de planes de pensión internacionales
Oportunidad de negocios en la distribución de planes de pensión internacionalesOportunidad de negocios en la distribución de planes de pensión internacionales
Oportunidad de negocios en la distribución de planes de pensión internacionales
Prime Financial Advisors
 
Pricing matrix
Pricing matrixPricing matrix
Pricing matrix
Phil Heft
 
Send SMS Surveys to your Clients and Candidates Pre and Post-Interview
Send SMS Surveys to your Clients and Candidates Pre and Post-InterviewSend SMS Surveys to your Clients and Candidates Pre and Post-Interview
Send SMS Surveys to your Clients and Candidates Pre and Post-Interview
Mediaburst
 
Presentazione servizi SpinData
Presentazione servizi SpinDataPresentazione servizi SpinData
Presentazione servizi SpinData
Narcisio Di Ninni
 
Événementiel Magazine: Les Chatbots en force
Événementiel Magazine: Les Chatbots en forceÉvénementiel Magazine: Les Chatbots en force
Événementiel Magazine: Les Chatbots en force
FredGarrec
 
Master mx 75a edicion
Master mx 75a edicionMaster mx 75a edicion
Master mx 75a edicion
Master Mx
 
Tabela de infracões e penalidades
Tabela de infracões e penalidadesTabela de infracões e penalidades
Tabela de infracões e penalidadesAdriano Monteiro
 
Progressive Caucus Letter Public Option
Progressive Caucus Letter Public OptionProgressive Caucus Letter Public Option
Progressive Caucus Letter Public Option
DocJess
 
『手紙魔まみ』における穂村弘の文体の変容
『手紙魔まみ』における穂村弘の文体の変容『手紙魔まみ』における穂村弘の文体の変容
『手紙魔まみ』における穂村弘の文体の変容
Yatsushi Kuma
 
Metallurgy courses
Metallurgy coursesMetallurgy courses
Metallurgy courses
SEVUGARAJAN KARUPPAIAH, BE,MS.
 

Viewers also liked (20)

Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)Introduction to OpenCV 3.x (with Java)
Introduction to OpenCV 3.x (with Java)
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
 
AmI 2016 - Python basics
AmI 2016 - Python basicsAmI 2016 - Python basics
AmI 2016 - Python basics
 
Continuous integration with teamcity
Continuous integration with teamcityContinuous integration with teamcity
Continuous integration with teamcity
 
360 Company Analysis Infographic
360 Company Analysis Infographic360 Company Analysis Infographic
360 Company Analysis Infographic
 
[英語] 小学校3年生外国語活動 年間指導計画例 [四万十市素案]
[英語] 小学校3年生外国語活動 年間指導計画例 [四万十市素案][英語] 小学校3年生外国語活動 年間指導計画例 [四万十市素案]
[英語] 小学校3年生外国語活動 年間指導計画例 [四万十市素案]
 
"Pizza with the Pros" at Heartland CC 28MAR17
"Pizza with the Pros" at Heartland CC 28MAR17"Pizza with the Pros" at Heartland CC 28MAR17
"Pizza with the Pros" at Heartland CC 28MAR17
 
Branding e Psicologia del Colore
Branding e Psicologia del ColoreBranding e Psicologia del Colore
Branding e Psicologia del Colore
 
UV LED
UV LEDUV LED
UV LED
 
Oportunidad de negocios en la distribución de planes de pensión internacionales
Oportunidad de negocios en la distribución de planes de pensión internacionalesOportunidad de negocios en la distribución de planes de pensión internacionales
Oportunidad de negocios en la distribución de planes de pensión internacionales
 
Pricing matrix
Pricing matrixPricing matrix
Pricing matrix
 
Send SMS Surveys to your Clients and Candidates Pre and Post-Interview
Send SMS Surveys to your Clients and Candidates Pre and Post-InterviewSend SMS Surveys to your Clients and Candidates Pre and Post-Interview
Send SMS Surveys to your Clients and Candidates Pre and Post-Interview
 
Presentazione servizi SpinData
Presentazione servizi SpinDataPresentazione servizi SpinData
Presentazione servizi SpinData
 
Événementiel Magazine: Les Chatbots en force
Événementiel Magazine: Les Chatbots en forceÉvénementiel Magazine: Les Chatbots en force
Événementiel Magazine: Les Chatbots en force
 
Master mx 75a edicion
Master mx 75a edicionMaster mx 75a edicion
Master mx 75a edicion
 
Tabela de infracões e penalidades
Tabela de infracões e penalidadesTabela de infracões e penalidades
Tabela de infracões e penalidades
 
Progressive Caucus Letter Public Option
Progressive Caucus Letter Public OptionProgressive Caucus Letter Public Option
Progressive Caucus Letter Public Option
 
『手紙魔まみ』における穂村弘の文体の変容
『手紙魔まみ』における穂村弘の文体の変容『手紙魔まみ』における穂村弘の文体の変容
『手紙魔まみ』における穂村弘の文体の変容
 
Metallurgy courses
Metallurgy coursesMetallurgy courses
Metallurgy courses
 

Similar to Version Control with Git

Git 101
Git 101Git 101
Git 101
jayrparro
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
Vikram SV
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
Cristian Lucchesi
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucketMedhat Dawoud
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
HuthaifaAlmaqrami1
 
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumIntroduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
AbhijitNarayan2
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
Geoff Hoffman
 
Git hub
Git hubGit hub
Git hub
Nitin Goel
 
Git & Github
Git & GithubGit & Github
Git & Github
Aman Lalpuria
 
Git
GitGit
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
PRIYATHAMDARISI
 
git2.ppt
git2.pptgit2.ppt
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version Control
Sourabh Sahu
 
Version control and GIT Primer
Version control and GIT PrimerVersion control and GIT Primer
Version control and GIT Primer
saadulde
 
Bitbucket as a code server and pmt
Bitbucket as a code server and pmt Bitbucket as a code server and pmt
Bitbucket as a code server and pmt
malike4u
 
Git
GitGit
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
Sebin Benjamin
 

Similar to Version Control with Git (20)

Git 101
Git 101Git 101
Git 101
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
 
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumIntroduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
 
git.ppt.pdf
git.ppt.pdfgit.ppt.pdf
git.ppt.pdf
 
Git Training
Git TrainingGit Training
Git Training
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Git hub
Git hubGit hub
Git hub
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Git
GitGit
Git
 
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
 
git2.ppt
git2.pptgit2.ppt
git2.ppt
 
Understanding GIT and Version Control
Understanding GIT and Version ControlUnderstanding GIT and Version Control
Understanding GIT and Version Control
 
Version control and GIT Primer
Version control and GIT PrimerVersion control and GIT Primer
Version control and GIT Primer
 
Bitbucket as a code server and pmt
Bitbucket as a code server and pmt Bitbucket as a code server and pmt
Bitbucket as a code server and pmt
 
Git
GitGit
Git
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 

More from Luigi De Russis

Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric SpeechAssessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Luigi De Russis
 
Semantic Web: an Introduction
Semantic Web: an IntroductionSemantic Web: an Introduction
Semantic Web: an Introduction
Luigi De Russis
 
Semantic Web - Ontology 101
Semantic Web - Ontology 101Semantic Web - Ontology 101
Semantic Web - Ontology 101
Luigi De Russis
 
AmI 2017 - Python intermediate
AmI 2017 - Python intermediateAmI 2017 - Python intermediate
AmI 2017 - Python intermediate
Luigi De Russis
 
AmI 2017 - Python basics
AmI 2017 - Python basicsAmI 2017 - Python basics
AmI 2017 - Python basics
Luigi De Russis
 
Ambient Intelligence: An Overview
Ambient Intelligence: An OverviewAmbient Intelligence: An Overview
Ambient Intelligence: An Overview
Luigi De Russis
 
LAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks TechnologiesLAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks Technologies
Luigi De Russis
 
AmI 2015 - Python basics
AmI 2015 - Python basicsAmI 2015 - Python basics
AmI 2015 - Python basics
Luigi De Russis
 
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
Luigi De Russis
 
Interacting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis PresentationInteracting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis Presentation
Luigi De Russis
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
Luigi De Russis
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)
Luigi De Russis
 
Living in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD ReportLiving in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD Report
Luigi De Russis
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
Luigi De Russis
 
Social Network Technologies
Social Network TechnologiesSocial Network Technologies
Social Network Technologies
Luigi De Russis
 
Clean Code
Clean CodeClean Code
Clean Code
Luigi De Russis
 
Living in Smart Environments - 2nd year PhD Report
Living in Smart Environments - 2nd year PhD ReportLiving in Smart Environments - 2nd year PhD Report
Living in Smart Environments - 2nd year PhD Report
Luigi De Russis
 
Introduction to OpenCV
Introduction to OpenCVIntroduction to OpenCV
Introduction to OpenCV
Luigi De Russis
 
Installing OpenCV 2.4.x with Qt
Installing OpenCV 2.4.x with QtInstalling OpenCV 2.4.x with Qt
Installing OpenCV 2.4.x with QtLuigi De Russis
 
dWatch: a Personal Wrist Watch for Smart Environments
dWatch: a Personal Wrist Watch for Smart EnvironmentsdWatch: a Personal Wrist Watch for Smart Environments
dWatch: a Personal Wrist Watch for Smart Environments
Luigi De Russis
 

More from Luigi De Russis (20)

Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric SpeechAssessing Virtual Assistant Capabilities with Italian Dysarthric Speech
Assessing Virtual Assistant Capabilities with Italian Dysarthric Speech
 
Semantic Web: an Introduction
Semantic Web: an IntroductionSemantic Web: an Introduction
Semantic Web: an Introduction
 
Semantic Web - Ontology 101
Semantic Web - Ontology 101Semantic Web - Ontology 101
Semantic Web - Ontology 101
 
AmI 2017 - Python intermediate
AmI 2017 - Python intermediateAmI 2017 - Python intermediate
AmI 2017 - Python intermediate
 
AmI 2017 - Python basics
AmI 2017 - Python basicsAmI 2017 - Python basics
AmI 2017 - Python basics
 
Ambient Intelligence: An Overview
Ambient Intelligence: An OverviewAmbient Intelligence: An Overview
Ambient Intelligence: An Overview
 
LAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks TechnologiesLAM 2015 - Social Networks Technologies
LAM 2015 - Social Networks Technologies
 
AmI 2015 - Python basics
AmI 2015 - Python basicsAmI 2015 - Python basics
AmI 2015 - Python basics
 
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...PowerOnt: an ontology-based approach for power consumption estimation in Smar...
PowerOnt: an ontology-based approach for power consumption estimation in Smar...
 
Interacting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis PresentationInteracting with Smart Environments - Ph.D. Thesis Presentation
Interacting with Smart Environments - Ph.D. Thesis Presentation
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
 
Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)Introduction to OpenCV (with Java)
Introduction to OpenCV (with Java)
 
Living in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD ReportLiving in Smart Environments - 3rd year PhD Report
Living in Smart Environments - 3rd year PhD Report
 
Semantic Web: an introduction
Semantic Web: an introductionSemantic Web: an introduction
Semantic Web: an introduction
 
Social Network Technologies
Social Network TechnologiesSocial Network Technologies
Social Network Technologies
 
Clean Code
Clean CodeClean Code
Clean Code
 
Living in Smart Environments - 2nd year PhD Report
Living in Smart Environments - 2nd year PhD ReportLiving in Smart Environments - 2nd year PhD Report
Living in Smart Environments - 2nd year PhD Report
 
Introduction to OpenCV
Introduction to OpenCVIntroduction to OpenCV
Introduction to OpenCV
 
Installing OpenCV 2.4.x with Qt
Installing OpenCV 2.4.x with QtInstalling OpenCV 2.4.x with Qt
Installing OpenCV 2.4.x with Qt
 
dWatch: a Personal Wrist Watch for Smart Environments
dWatch: a Personal Wrist Watch for Smart EnvironmentsdWatch: a Personal Wrist Watch for Smart Environments
dWatch: a Personal Wrist Watch for Smart Environments
 

Recently uploaded

Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 

Recently uploaded (20)

Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 

Version Control with Git

  • 1. Git AN INTRODUCTION Introduction to Git as a version control system: concepts, main features and practical aspects.
  • 2. How do you share and save data? • “I’m working solo… and I only have one computer” 3/13/2015 Version Control with Git 2 What I need: - backup; - different saved versions; - early and frequently saving. What I can use: - external hard drives; - dedicated folder; - Dropbox folder; - …
  • 3. How do you share and save data? • “I’m working solo… and I only have one computer” 3/13/2015 Version Control with Git 3 What if… - … I forget to save a specific version and then I need it? - … I delete/loose a previous version?
  • 4. How do you share and save data? • “I’m working solo… and I have more than one computer” 3/13/2015 Version Control with Git 4 What I need: - backup; - different saved versions; - early and frequently saving; - conventions on file names. What I can use: - USB memory sticks; - external hard drives; - Dropbox folder; - shared folder; - …
  • 5. How do you share and save data? • “I’m working solo… and I have more than one computer” 3/13/2015 Version Control with Git 5 What if… - … I forget to save a specific version and then I need it? - … I delete/loose a previous version? - … I have different projects in the “shared” workspace? - … I forget to copy one version between computers?
  • 6. How do you share and save data? • “I’m working in team” 3/13/2015 Version Control with Git 6 What I need: - backup; - different saved versions; - early and frequently saving; - shared conventions on file names. What I can use: - USB memory sticks; - external hard drives; - Dropbox folder; - e-mails; - …
  • 7. How do you share and save data? • “I’m working in team” 3/13/2015 Version Control with Git 7 Other issues: - who has the latest version? - who has the right to edit? - how to ensure that everyone sees up-to-date versions of everything? - how to handle conflicts? What if… - … a team member forgets to save a specific version and then someone else needs it? - … someone deletes/looses a version? - … someone forgets to share a specific version of the projects?
  • 8. Version Control Systems Three generations: 1. Local (RCS, SCCS) 2. Centralized (CVS, Subversion, Team Foundation Server) 3. Distributed (Git, Mercurial) 3/13/2015 Version Control with Git 8 Record changes to a file or a set of files over time so that you can recall specific versions later NOW
  • 9. Basic Concepts Repository – place where you store all your work – contains every version of your work that has ever existed • files • directories layout • history – can be shared by the whole team 3/13/2015 Version Control with Git 9
  • 10. Basic Concepts Working copy – a snapshot of the repository used for… working – the place where changes happens – private, not shared by the team – it also contains some metadata so that it can keep track of the state of things • has a file been modified? • is this file new? • has a file been deleted? 3/13/2015 Version Control with Git 10
  • 11. Basic Concepts Commit – the operation that modifies the repository – atomically performed by modern version control tools • the integrity of the repository is assured – it is typical to provide a log message (or comment) when you commit • to explain the changes you have made • the message becomes part of the history of the repository 3/13/2015 Version Control with Git 11
  • 12. Basic Concepts Update – update the working copy with respect to the repository • apply changes from the repository • merge such changes with the ones you have made to your working copy, if necessary 3/13/2015 Version Control with Git 12
  • 13. Centralized Version Control • one central repository • client-server relationship 3/13/2015 Version Control with Git 13
  • 14. Distributed Version Control • clients and server have the full copy of the repository – local repositories clone a remote repository • it is possible to have more than one server 3/13/2015 Version Control with Git 14
  • 15. More Basic Concepts Push – copy changesets from a local repository instance to a remote one • synchronization between two repository instances 3/13/2015 Version Control with Git 15
  • 16. More Basic Concepts Pull – copy changesets from a remote repository instance to a local one • synchronization between two repository instances 3/13/2015 Version Control with Git 16
  • 17. Introducing… Git • Distributed Version Control System • Born – on 2005 for the Linux kernel project – to be used via command line • Website: http://git-scm.com • Highlights: – free and open source – strong support for non-linear development – fully distributed – efficient handling of large projects – cryptographic authentication of history 3/13/2015 Version Control with Git 17
  • 18. Who uses Git? 3/13/2015 Version Control with Git 18
  • 19. Getting started with Git • Standard installations – http://git-scm.com/downloads • Available for all the platform • Git Graphical Applications – http://git-scm.com/downloads/guis • For this course, Git is – included in RailsInstaller – integrated in RubyMine 3/13/2015 Version Control with Git 19
  • 20. Installing Git • Windows – download and install Git from http://git- scm.com/downloads • Linux – check if it is already installed • open a terminal and type “git” – otherwise, install it from your package manager or via http://git-scm.com/downloads • Mac – check if it is already installed • open a terminal and type “git” – otherwise, install it from http://git-scm.com/downloads 3/13/2015 Version Control with Git 20
  • 21. Git by Example Marco and Dave work for the same company, but in two different countries. They have to realize a new software project, so they decided to make it in Ruby and to use Git for version control. 3/13/2015 Version Control with Git 21 SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND
  • 22. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example Marco starts the project by creating a new Git repository on the central server. He goes into the project directory and types: to initialize an empty Git repository for the project. 3/13/2015 Version Control with Git 22 git init --bare myproject.git
  • 23. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example When the central repository is ready, Dave create a folder named myproject on his computer and initializes a repository in it: 3/13/2015 Version Control with Git 23 git init
  • 24. Git by Example • initializes an empty Git repository inside an existing folder • creates a .git directory inside it • without parameters, typically – on the server, it is used with the --bare parameter 3/13/2015 Version Control with Git 24 git init
  • 25. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example Dave writes some code in the myproject folder. Before committing, Dave needs to really put the created file under version control, by adding the file to the Staging area: 3/13/2015 Version Control with Git 25 git add main.rb
  • 26. The Staging Area • A sort of loading dock • It can contain things that are neither in the working copy nor in the repository instance • Also called “index” 3/13/2015 Version Control with Git 26 STAGING AREA
  • 27. The Staging Area: an example • Imagine to modify an existing file in the working copy • The file is marked as “modified” 3/13/2015 Version Control with Git 27 STAGING AREA
  • 28. The Staging Area: an example • Before committing, the modified file needs to be “staged” – i.e., add a snapshot of it in the staging area • Modified data has been marked in its current version to go into the next commit snapshot 3/13/2015 Version Control with Git 28 STAGING AREA ADD
  • 29. The Staging Area: an example • Then, changes can be “committed” – i.e., take the file from the staging area and store permanently the snapshot in the local repository 3/13/2015 Version Control with Git 29 STAGING AREA
  • 30. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example If Dave wants permanently to exclude from version control some files in the project folder, he can add them in the .gitignore file – such files and folders will not be staged 3/13/2015 Version Control with Git 30
  • 31. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example After adding main.rb to the Staging area, Dave can commit the file to the local repository: 3/13/2015 Version Control with Git 31 git commit -m “initial commit”
  • 32. Git by Example • store the current snapshot in the local repository • -m “put a message here” – perform the commit with a log message – useful to know what you have committed • - a – a useful parameter – it performs an add for modified files, too • useless at this point 3/13/2015 Version Control with Git 32 git commit -m “initial commit”
  • 33. Git by Example Dave is ready to load the data to the remote repository. He has to specify what is the remote server to use: 3/13/2015 Version Control with Git 33 SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND git remote add origin http://centralserver.com/myproject.git
  • 34. Git by Example • add a new remote repository – multiple remotes can exists • for each remote, a name and an address is specified – origin is the “standard” name for indicating the principal remote – the address can be in the format http(s):// or git:// • remotes can also be removed, renamed, etc. 3/13/2015 Version Control with Git 34 git remote add origin http://centralserver.com/myproject.git
  • 35. Git by Example Now Dave can push the data to the remote repository: where origin is the remote name and master is the default branch name 3/13/2015 Version Control with Git 35 SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND git push -u origin master
  • 36. Git by Example • Git pushes only to matching branches – for every branch that exists on the local side, the remote side is updated if a branch of the same name already exists there • this behavior will change with Git 2.0 – you have to push the branch explicitly the first time • -u – set other information useful for other commands (e.g., pull) • After the first time, you can simply use: – git push 3/13/2015 Version Control with Git 36 git push -u origin master
  • 37. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example Marco starts working on the project and clones the remote repository on his computer: Now Marco has the code! 3/13/2015 Version Control with Git 37 git clone http://centralserver.com/myproject.git
  • 38. Git by Example • creates a directory named myproject • initializes a .git directory inside it • pulls down all the data for that repository • checks out a working copy of the latest version If you want to clone the repository into a directory with another name, you can specify that as: 3/13/2015 Version Control with Git 38 git clone http://centralserver.com/myproject.git git clone http://centralserver.com/myproject.git first_project
  • 39. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example Marco wants to see the details of what Dave did: The result will be something like: 3/13/2015 Version Control with Git 39 git log commit bcb39bee268a92a6d2930cc8a27ec3402ebecf0d Author: Dave <dave@email.co.uk> Date: Wed Mar 12 10:06:13 2015 initial commit
  • 40. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example Marco wants to see the details of what Dave did: The result will be something like: 3/13/2015 Version Control with Git 40 git log commit bcb39bee268a92a6d2930cc8a27ec3402ebecf0d Author: Dave <dave@email.co.uk> Date: Wed Mar 12 10:06:13 2015 initial commit bcb39bee268a92a6d2930cc8a27ec3402ebecf0d SHA-1 hash for data integrity
  • 41. Git by Example • At this point, Marco edits the source code and saves • To see the pending changes, he can use: – git status • To see the difference between his version and the previous one, he can use: – git diff (--cached, to include staged files) • Marco decides to commit and to push his work 3/13/2015 Version Control with Git 41 git commit -a -m “added new functionalities” git push
  • 42. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example Meanwhile, Dave found some bugs in the code. He looks for update on the central server and get it (if any): 3/13/2015 Version Control with Git 42 git pull
  • 43. Pull and Fetch in Git Fetch – copy changesets from a remote repository instance to a local one – previously, we called it “pull” Pull – perform fetch – update the working copy 3/13/2015 Version Control with Git 43
  • 44. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example However, no new data is available since Marco has not yet pushed his changes. So, Dave fixes the bugs, and commits: 3/13/2015 Version Control with Git 44 git commit -a -m “bug fixing”
  • 45. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example After some time, Dave tries to push his changes but something goes wrong 3/13/2015 Version Control with Git 45 git push To http://centralserver.com/myproject ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to ‘http://centralserver.com/myproject’
  • 46. Git by Example • What happens? – Git is not allowing Dave to push his changes because Marco has already pushed something to the master branch • Solution: – Dave has to do a pull, to bring in changes before pushing his modifications • Two possible scenarios: – merging of files goes smoothly; – merging of files generates conflicts. 3/13/2015 Version Control with Git 46
  • 47. Git by Example • Merge with conflicts • Git includes both Marco’s code and Dave’s code with conflict markers to delimit things 3/13/2015 Version Control with Git 47 From http://centralserver.com/myproject b19f36c..b77378f master -> origin/master Auto-merging main.rb CONFLICT (content): Merge conflict in main.rb Automatic merge failed; fix conflicts and then commit the result. <<<<<<< HEAD # Marco’s code here ======= # Dave’s code here >>>>>>> b77378f6eb0af44468be36a085c3fe06a80e0322
  • 48. SOMEWHERE IN THE USA MARCO, ITALY DAVE, ENGLAND Git by Example After (manually) resolving these conflicts, Dave is able to push the changes: 3/13/2015 Version Control with Git 48 git push
  • 49. Other Useful Commands • Operations on files – Remove: git rm [filename] – Move/rename: git mv [file-from] [file-to] – Unstage some staged files: git reset HEAD [filename- list] – Unmodify a modified file: git checkout -- [filename] • Change the last commit – git commit --amend 3/13/2015 Version Control with Git 49
  • 50. Other Useful Commands • Operations on remotes – List: git remote (-v, to show the URLs) – Add: git remote add [shortname] [url] – Inspect: git remote show [remote-name] – Rename: git remote rename [old-name] [new-name] – Remove: git remote rm [remote-name] 3/13/2015 Version Control with Git 50
  • 51. Tags and Branches in a Nutshell • Local and remote • Do not push automatically [Image from http://nvie.com/posts/a-successful-git-branching-model/] 3/13/2015 Version Control with Git 51
  • 52. Tags… in brief • useful to mark release points • two types: – lightweight – annotated (more complete) • commands: – git tag, shows the available existing tags – git tag [tag-name], creates a lightweight tag – git tag -a [tag-name] -m [message]‚ creates an annotated tag – tag show [tag-name], shows the tag data 3/13/2015 Version Control with Git 52
  • 53. Branches… in brief • used to develop features isolated from each other • the master branch is the “default” branch when you create a repository – you should use other branches for development and merge them back to the master branch upon completion • really lightweight in Git • commands: – git branch [branch-name], create a new branch – git branch, lists all existing branches – git checkout [branch-name], switches to the selected branch – git branch -d [branch-name], removes the selected branch 3/13/2015 Version Control with Git 53
  • 54. Hosted Git • To have (at least) one remote repository – alternative: set up your own Git server! • Most popular: – GitHub, https://github.com/ – Bitbucket, https://bitbucket.org/ – Sourceforge, http://sourceforge.net/ – CodePlex (by Microsoft), https://www.codeplex.com/ 3/13/2015 Version Control with Git 54
  • 55. GitHub • Slightly different than other code-hosting sites – instead of being primarily based on the project, it is user-centric – social coding • A commercial company – charges for accounts that maintain private repository – free account to host as many open source project as you want – free Micro plan for students • 5 private repositories, unlimited public repositories • https://education.github.com 3/13/2015 Version Control with Git 55
  • 56. Bitbucket • Similar to GitHub • Less used than GitHub, right now • Mercurial support • A commercial company – free private and public repositories for small team (up to 5 private collaborators) – charges for project involving bigger team – free for academia (also for students) • unlimited public and private repositories • unlimited users for single projects 3/13/2015 Version Control with Git 56
  • 57. GitHub Pages • Website for your (GitHub) repository – https://pages.github.com/ • We will use it for hosting your project documentation – everything realized in Modulo B – your website will be reachable from http://lam-2015.github.io/your-project-name • FAQ – https://help.github.com/categories/github-pages- basics/ 3/13/2015 Version Control with Git 57
  • 58. Homework(s) • Create a personal GitHub account – you can also ask for a “student discount” at https://education.github.com – we will require your username to set up your team repositories for final projects • Try Git! – http://try.github.io/ – 15 minutes tutorial 3/13/2015 Version Control with Git 58
  • 59. References • Git Reference – http://gitref.org/ • Git - the simple guide – http://rogerdudler.github.io/git-guide/ • Git Documentation – http://git-scm.com/docs • Pro Git (online book) – http://git-scm.com/book • Version Control by Example (online book) – http://www.ericsink.com/vcbe/ 3/13/2015 Version Control with Git 59
  • 60. References • Try Git! – http://try.github.io/ • Various Git resources – https://help.github.com/articles/what-are-other-good- resources-for-learning-git-and-github • A successful Git branching model – http://nvie.com/posts/a-successful-git-branching-model/ • Some Git (graphical) clients – http://git-scm.com/downloads/guis • EGit, Eclipse plugin for Git – http://www.eclipse.org/egit/ 3/13/2015 Version Control with Git 60
  • 61. Questions? 02NPYPD LINGUAGGI E AMBIENTI MULTIMEDIALI Luigi De Russis luigi.derussis@polito.it
  • 62. License • This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC BY-NC-SA 3,0)” License. • You are free: – to Share - to copy, distribute and transmit the work – to Remix - to adapt the work • Under the following conditions: – Attribution - You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). – Noncommercial - You may not use this work for commercial purposes. – Share Alike - If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. • To view a copy of this license, visit http://creativecommons.org/license/by-nc-sa/3.0/ 3/13/2015 Version Control with Git 62