Git 12613901533412 Phpapp02
Git 12613901533412 Phpapp02
c tpurea
ntado
n u
p
d
e
Git
Jeroen Rosenberg
[email protected]
m
Table of contents
Short introduction
Benefits
Benefits
Allows a team to share code
Benefits
Allows a team to share code
Maintains separate “production” versions
of code that are always deployable
Benefits
Allows a team to share code
Maintains separate “production” versions
of code that are always deployable
Allows simultaneous development of
different features on the same codebase
Benefits
Allows a team to share code
Maintains separate “production” versions
of code that are always deployable
Allows simultaneous development of
different features on the same codebase
Keeps track of all old versions of files
Benefits
Allows a team to share code
Maintains separate “production” versions
of code that are always deployable
Allows simultaneous development of
different features on the same codebase
Keeps track of all old versions of files
Prevents work being overwritten
Git
Subversion Git
Subversion Git
Centralized Distributed
Subversion Git
Centralized Distributed
Branching can be a pain and Branching is very easy and is
is used sparingly a core concept
Subversion Git
Centralized Distributed
Branching can be a pain and Branching is very easy and is
is used sparingly a core concept
Conflicts frequently occur and Conflicts occur less frequent,
renaming is not handled well renaming is properly handled
Subversion Git
Centralized Distributed
Branching can be a pain and Branching is very easy and is
is used sparingly a core concept
Conflicts frequently occur and Conflicts occur less frequent,
renaming is not handled well renaming is properly handled
Can be slow due to network Very fast since less operations
latency involve network latency
Subversion Git
Centralized Distributed
Branching can be a pain and Branching is very easy and is
is used sparingly a core concept
Conflicts frequently occur and Conflicts occur less frequent,
renaming is not handled well renaming is properly handled
Can be slow due to network Very fast since less operations
latency involve network latency
Can consume quite some disk Consumes 30 times less disk
space space
Basic operations
SVN Git
$ svn checkout url $ git clone url
SVN Git
$ svn checkout url $ git clone url
SVN Git
$ svn checkout url $ git clone url
SVN Git
$ svn checkout url $ git clone url
SVN Git
$ svn checkout url $ git clone url
$ svn update $ git pull
$ svn add file $ git add file
$ svn rm file $ git rm file
$ svn mv file $ git mv file
$ svn commit $ git commit –a
$ svn revert path $ git checkout path
SVN Git
… …
$ svn mv file $ git mv file
$ svn commit $ git commit –a
$ svn revert path $ git checkout path
or
Instant merging
SVN Git
$ svn checkout url $ git clone url
$ svn update $ git pull
$ svn add file $ git add file
… …
SVN Git
$ svn checkout url $ git clone url
$ svn update $ git pull
$ svn add file $ git add file
… …
SVN Git
$ svn checkout url $ git clone url
$ svn update $ git pull
$ svn add file $ git add file
… …
SVN Git
$ svn checkout url $ git clone url
$ svn update $ git pull
$ svn add file $ git add file
… …
SVN Git
$ svn checkout url $ git clone url
$ svn update $ git pull
$ svn add file $ git add file
… …
SVN Git
$ svn checkout url $ git clone url
$ svn update $ git pull
$ svn add file $ git add file
… …
…and commit!
A core concept
SVN Git
$ svn copy $ git branch
url_of_trunk name_of_branch
url_of_branch
SVN Git
$ svn copy $ git branch
url_of_trunk name_of_branch
url_of_branch
Source: http://git.or.cz
§ OpenInGitGui
§ OpenInGitGui
§ OpenInGitGui
Eclipse integration
§ JGit / EGit
Performance
References
Git: http://git-scm.com/download
Git Docs: http://git-scm.com/documentation
GitX: http://gitx.frim.nl/
TortoiseGit: http://code.google.com/p/tortoisegit/
Git Extensions:
http://sourceforge.net/projects/gitextensions/
JGit / EGit: http://www.eclipse.org/egit/