Git - Intro to the Basics of DVCS
-
date post
22-Oct-2014 -
Category
Education
-
view
2.818 -
download
2
description
Transcript of Git - Intro to the Basics of DVCS
The Git source code control system
Dueling Coders
by Matthew McCullough & Tim Berglund
SVN Git
Why Another?
Not just for versioning source
Distributed Version Control Systems (DVCS)
Value of centralized + decentralized
Easy merging from many branches
Doesn’t pollute
100,000 artifacts
Git Going
Getting Git
• Cygwin
• MacPorts
• Distro-specific package manager
• Binaries
Username Setup
git config --global user.email [email protected]
URL Styles
• Public Clone URL (Git Protocol)git://github.com/matthewmccullough/helloworld.git
• Private Clone Path (SSH Protocol)[email protected]:matthewmccullough/helloworld.git
• Filesystem Path/users/mccm06/projects/helloworld.git
Cloning Repos
• Command to retrieve a remote repo
• Works against Git and SVN
IDE Tools
• EGit, Eclipse Plugin Update Sitehttp://www.jgit.org/update-sitehttp://github.com/guides/using-the-egit-eclipse-plugin-with-github
• Git4IdeaGet via plugins menu
• Netbeanshttp://git.or.cz/gitwiki/NetBeansPlugin
Sharing Repos
Serve
git help daemon
Serve
git daemon --export-all --base-path=.
Free Git Hosting
Githubhttp://github.com
Gitorioushttp://gitorious.org
Sharing Demo
Add, Checkin
git add *.java
git commit -m‘Did some work’
Switch Branch, Checkout
git branch ANEWBRANCH
git checkout ANEWBRANCH
Push
git push origin master
Pull
git pull origin master
Branching
Just Branches?
Core idea of DVCS
Same as always, but less painful
Branches are local
Branch for every feature
Main is for generals
Branching Demo
Merge
git merge ANEWBRANCH(destination = current branch)
Conflicts
Squash
git merge --squash ANEWBRANCH(destination = current branch)
Tag
git tag VERSION1.0
Cherry Pick
git cherry-pick -r e8ac5ed693(destination = current branch)
Resources
Documentation
• Wiki has the most up to date info.http://git.or.cz/gitwiki/InterfacesFrontendsAndTools
How To Guides
• http://github.com/guides/home
Quick Reference
• http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html
Q&A