Date post: | 11-Nov-2014 |
Category: |
Technology |
Upload: | dariusz-luksza |
View: | 427 times |
Download: | 7 times |
2
Agenda
● What Git is?● History● Git vs. CVS/SVN● How Git works?
● Git commands● What EGit 0.8.1 can do?● Demo Time!
● First: project, commit, branch, tag, fetch, push, merge● Keep high code quality thanks to Git
3
History of Git'a2005 - Linus Torvalds starts Git
2006 - Proof-of-concept, quite unusable
2007 - Index reader, quickdiff
2008 - Add history view, commit, push/fetch
2009 - Eclipse decides on Git; moved to Eclipse.org
3/2010 - Released 0.7.0
Diff/Merge
Automatic IP Logs
Preliminary merge algorithm implementation (not really usable for now on)
6/2010 - Released 0.8.0
Usability Improvements
Git Repositories View
Tagging Slide taken from presentation:Understanding and Using Git at Eclipse | © 2010 by C. Aniszczyk, S. Pearce, R. Rosenberg and M. Sohn
4
Git vs. CVS/SVN
● Distributed (but …)● Ability to work off-line● Full local history
● Versions are described using SHA-1
● Fast and lightweight branches
● Checkout on repository level
● Complex tag's
● Centralized● no● no
● Numerically described versions
● Every branch is a full copy of repository
● Checkout on file/catalog level
● Simple tag's
5
How Git works?Saves state not deltas.
Images taken from Pro Git book (http://progit.org)
6
How Git works?Objects
Images taken from Pro Git book (http://progit.org)
7
How Git works?Branches and tags
Image taken from Pro Git book (http://progit.org)
v1.0
8
How Git works?
Merge (fast-forward)
Images taken from Pro Git book (http://progit.org)
fast-forwardmerge
9
How Git works?
Merge (three-way merge)
Images taken from Pro Git book (http://progit.org)
three-waymerge
10
How Git works?Rebase
1.
2.
3.
11
How Git works?Structure of .git
extensions
global exclude filerecord branch changes
object storage
local branchesdefault main branch
remote tracking branches, divided by repositorydefault remote repository
default remote branch
configuration for this repository
cache for staging changes for next committip of current branch
12
Git commands
● git init / git clone
● git add
● git status
● git commit
● git diff
● git fetch
● git log
● git merge
● git rebase
● git remote
● git pull
● git push
● git stash
● git branch
● git tag
● git checkout
● git config
● git format-patch
● git mv / git rm
● git reset
13
Git commands
● git init / git clone
● git add
● git status
● git commit
● git diff
● git fetch
● git log
● git merge
● git rebase
● git remote
● git pull
● git push
● git stash
● git branch
● git tag
● git checkout
● git config
● git format-patch
● git mv / git rm
● git reset
14
What EGit 0.8.1 can do?
● git init / git clone
● git add
● git status
● git commit
● git diff
● git fetch
● git log
● git merge
● git rebase
● git remote
● git pull
● git push
● git stash
● git branch
● git tag
● git checkout
● git config
● git format-patch
● git mv / git rm
● git reset Autorem grafik jest:Deleket (Jojo Mendoza)
15
Demo Time!
16
Create and share project locally.
First demo
17
Second Demo
Working with remote project.
We'll use gitosis as a Git server and CGit for on-line project presentation.
18
Third demo
Benefiting from distributed VCS.
Using Git and Gerrit for keeping project in good shape.
19
Q&A
● Git: http://git-scm.com/● EGit: http://eclipse.org/egit/● JGit: http://eclipse.org/jgit/● EGit mailing list:
http://dev.eclipse.org/mhonarc/lists/egit-dev/● JGit mailing list:
http://dev.eclipse.org/mhonarc/lists/jgit-dev/● There is also an EGit forum on Eclipse forums:
http://www.eclipse.org/forums/