Egit 1.0

download Egit 1.0

If you can't read please download the document

Transcript of Egit 1.0

EGit 1.0 - Git integration in Eclipse

Software Configuration Management

Git

Egit

Take away

Further readings

Q & A

Eclipse Democamp 2011 Bucharest, Romania

Antonel Ernest Pazargic

EGit 1.0 - Git integration in Eclipse

Software Configuration ManagementTypes:Centralizedsingle point of failure

server based

bottleneck

Decentralizedany participant can act as both server and client.

disconnected operation

complete history

backups are trivial

Speed

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Git HistoryBefore April 6, 2005 Linux development have been using BitKeeper (BitMover drops free license).

Linux Git was initially designed and developed by Linus Torvalds.

Since June 16, 2005 the entire Linux kernel is developed using the Git distributed SCM.

February 14, 2007 GIT 1.5.0 was released

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Git InstallationLinux$ yum install git-core

$ apt-get install git-core

Mac 10.4In both Mac 10.4 and 10.5, you can install Git via MacPorts.

$ sudo port install git-core

WindowsOn Windows, installing Git is pretty easy. Simply download and install the msysGit package.

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Git ComponentsWorking tree: directories, files

Repository contents: files, commits, ancestry

DAG Directed Acyclic Graph

References: Tags, Branches

HEAD: current checkout, points to branch, detached

Index (Staging area): what is to be committed

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Git Basic operations:Bootstrap: init

Modify: add, delete(rm), rename(mv), commit

Information: status, log, diff

Reference: tag, branch

Remote: clone, pull/fetch, push

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Git Structure.git/config private configuration

.git/descriptiondescribe the repository

.git/info/excludeignore based on patterns

.git/objectsImmutable

Loose objects based on SHA1.

Pack files

Object: type, size & containt. Types: tree, blob, commit, tag.

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Git Getting helpgit help#print the list of common commands

man git- # man page of the command (or git command --help)

git command -h #brief help

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Git Hands-on. Part 1cd mydir

mkdir project

git config --global user.name "Antonel Pazargic"

git config --global user.email "[email protected]"

git init # create the .git directory

echo "Hello git" > test.txt # untracked change

git add test.txt # staged (INDEX)

git commit -m"Test"# HEAD (master). 1st commit so this commit has no parent commit.

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Git Hands-on. Part 2git status # shows staged, unstaged and untracked

git diff# diffs between the index and the working files

git diff $commit1 $commit2# diffs between two commits (commit could be specified by full/short hash, tag, branch, remote branch)

git diff HEAD# diffs between HEAD and the working files

git diff --staged # diffs between HEAD and the index

git show# review last commit

git show HEAD~3# ~, ^ special characters to identify a certain

git log# see commit history

git log tag..branch# limit by range

git log HEAD~10..# limit by range

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Git Hands-on. Part 3git branch -l# list branches

git branch -r # list remote branches

git tag -l # list tags

git checkpout -b bugfix# checkout the current branch and create/switch to a new branch named bugfix

git tag -a -m"RC 1"# create a new tag for RC

git checkout master# switch to master branch

git merge bugfix# merge master with bugfix

git merge $One $Two# octopus merging. Merging master with One and TwoRemote

git clone git://[email protected]/project.git# replicates remote repository (Git URLs: file://, http://, git://, ssh://)

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Gitgitk

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

EGitOverviewEGit is a team provider for the distributed VCS Git. This tool is built on top of JGit (Java implementation of Git)

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

EgitInstallationPrerequisites:
Eclipse 3.7.0 Indigo, Java SE 1.4+Start Eclipse SDK

Install EGit using Eclipse Update Manager
Help>Install New Software...>

Work with: - http://download.eclipse.org/releases/indigo- http://download.eclipse.org/egit/updates

Use defaults, restart Workbench/Eclipse

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

EGitWorking with EGit

Eclipse Democamp 2011 Bucharest, Romania

Create a repository

Configure the repository

Git repositories explorer

EGit 1.0 - Git integration in Eclipse

EGitWorking with EGit

Eclipse Democamp 2011 Bucharest, Romania

Share a project

EGit 1.0 - Git integration in Eclipse

EGitWorking with EGit

Eclipse Democamp 2011 Bucharest, Romania

Git Staging before Add operation

Package explorer NO-HEAD

EGit 1.0 - Git integration in Eclipse

EGitWorking with EGit

Eclipse Democamp 2011 Bucharest, Romania

Add to index

Staged changes

EGit 1.0 - Git integration in Eclipse

EgitWorking with EGit

Eclipse Democamp 2011 Bucharest, Romania

Commit changes

Git commands

EGit 1.0 - Git integration in Eclipse

EGitHistory

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

EGitCompare with version in ancestor

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

EGitGit Preferences/Properties

Eclipse Democamp 2011 Bucharest, Romania

Project Git Properties

Project Git Properties

Workbench Git Preferences

EGit 1.0 - Git integration in Eclipse

EGitNew and noteworthy:Synchronize ViewMergeCreate a Git repository for multiple projectsRemote operations: push, pull, clone existing projectClone repositoryWorking with Github (GitHub Connector)Mylyn integrationGit Commit Search and Commit ViewerDouble clicking a commit in the search result opens the new Commit Viewer

Eclipse Democamp 2011 Bucharest, Romania

EGit 1.0 - Git integration in Eclipse

Further readinghttp://www.vogella.de/articles/Git/article.htmlhttp://www.vogella.de/articles/EGit/article.htmlhttp://progit.org/book/http://www.kernel.org/pub/software/scm/git/docs/gittutorial.htmlhttp://www.kernel.org/pub/software/scm/git/docs/user-manual.html

Thank you

Q & A

Eclipse Democamp 2011 Bucharest, Romania

Muokkaa otsikon tekstimuotoa napsauttamalla

Muokkaa jsennyksen tekstimuotoa napsauttamallaToinen jsennystasoKolmas jsennystasoNeljs jsennystasoViides jsennystasoKuudes jsennystasoSeitsems jsennystasoKahdeksas jsennystasoYhdekss jsennystaso