• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Git
 

Git

on

  • 1,375 views

Another small presentation I held at my company. I had to remove a few work-specific slides but the essentials are still there. ...

Another small presentation I held at my company. I had to remove a few work-specific slides but the essentials are still there.
The most important part is the branching section about branching best practices. Believe me: It just works if you do it this way!

Statistics

Views

Total Views
1,375
Views on SlideShare
1,070
Embed Views
305

Actions

Likes
1
Downloads
19
Comments
0

3 Embeds 305

http://code-n-fold.com 209
http://codenfold.wordpress.com 95
http://webcache.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • http://git.or.cz/course/svn.htmlhttp://whygitisbetterthanx.com/#svnhttp://markmcb.com/2008/10/18/3-reasons-to-switch-to-git-from-subversion/http://boxysystems.com/index.php/5-fundamental-differences-between-git-svn/
  • The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature
  • The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature
  • The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature

Git Git Presentation Transcript

  • Git. Daniel Kummer. Software Engineer.
  • SVN / Git
  • ArchitectureSVN Git
  • Project Structure SVN GITSeparate directory per Single project workingbranch: directoryproject project├── branch ├── .git│ ├── .svn ├── dir│ ├── dir │ └── file1.ext│ │ ├── .svn └── file.ext│ │ └── file1.ext│ └── file.ext└── trunk ├── .svn ├── dir │ ├── .svn │ └── file1.ext └── file.ext
  • Joining / Updating SVN GITsvn checkout URL git clone URLsvn update git pull
  • Branching SVN GIT git branch branchsvn copy git checkout branchhttp://svn.host.com/ # OR...project/trunk git checkout –bhttp://svn.host.com/ branchproject/branches/ # remote branchbranch git checkout --track -b branch origin/svn switch branchhttp://svn.host.com/project/branches/ git push originbranch branch
  • Merging SVN GITsvn merge –r 20:HEADhttp://svn.host.com/ git merge branchproject/branches/branch
  • Tagging SVN GITsvn copyhttp://svn.host.com/project/trunk git tag taghttp://svn.host.com/project/tags/tag
  • Similar…. commit diff status add rm mv log blameif unsure, check the help git [cmd] --help
  • Branching
  • development masterMain initialbranches commit•  Infinite lifetime production•  master = stable releaseProduction Release Tag X.X.0git checkout mastergit merge developmentgit tag x.x.xgit push origin mastergit push --tags Tag X.X.1 latest
  • featureX developmentFeaturebranches•  Usually local•  Use non-fast- forwardCreating Feature Branch merge withgit checkout –b featureX --no-ffIntegrating Feature Branchgit checkout developmentgit merge --no-ff featureX deletegit branch –d featureX branchgit push origin development
  • development release-x.x masterReleasebranches release features complete•  Production release preparation•  Release bugfixing releaseCreating Release Branch bugfixesgit checkout –b release-x.xFinishing Releasegit checkout master Taggit merge --no-ff release-x.xgit tag x.x.0
  • development hotfix-x.x.x masterHotfixbranches branch from master•  Severe production bugfixes•  Tag on master afterwards Tag merge into master AND development
  • Tooling
  • Command Line$ The fastest way to go$ Auto-completion support$ Aliases for the lazy$ Gitk – visual history viewer$ Git bash on Windows$ Good help
  • OSX - Sourcetree•  Standalone Client•  Free (Belongs to Atlassian by now)•  Excellent GUI•  Alternatives: Tower
  • Windows - SmartGit•  Standalone client•  Free (for personal use)•  All you need out of the box•  SmartGit 3 out soon•  Alternatives: TortoiseGit
  • Eclipse / IntelliJ•  eGit •  Fully integrated•  jGit base •  Needs getting•  It got a LOT used to better…