Git

1,511 views

Published on

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!

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,511
On SlideShare
0
From Embeds
0
Number of Embeds
421
Actions
Shares
0
Downloads
22
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • 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

    1. 1. Git. Daniel Kummer. Software Engineer.
    2. 2. SVN / Git
    3. 3. ArchitectureSVN Git
    4. 4. 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
    5. 5. Joining / Updating SVN GITsvn checkout URL git clone URLsvn update git pull
    6. 6. 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
    7. 7. Merging SVN GITsvn merge –r 20:HEADhttp://svn.host.com/ git merge branchproject/branches/branch
    8. 8. Tagging SVN GITsvn copyhttp://svn.host.com/project/trunk git tag taghttp://svn.host.com/project/tags/tag
    9. 9. Similar…. commit diff status add rm mv log blameif unsure, check the help git [cmd] --help
    10. 10. Branching
    11. 11. 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
    12. 12. 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
    13. 13. 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
    14. 14. development hotfix-x.x.x masterHotfixbranches branch from master•  Severe production bugfixes•  Tag on master afterwards Tag merge into master AND development
    15. 15. Tooling
    16. 16. Command Line$ The fastest way to go$ Auto-completion support$ Aliases for the lazy$ Gitk – visual history viewer$ Git bash on Windows$ Good help
    17. 17. OSX - Sourcetree•  Standalone Client•  Free (Belongs to Atlassian by now)•  Excellent GUI•  Alternatives: Tower
    18. 18. Windows - SmartGit•  Standalone client•  Free (for personal use)•  All you need out of the box•  SmartGit 3 out soon•  Alternatives: TortoiseGit
    19. 19. Eclipse / IntelliJ•  eGit •  Fully integrated•  jGit base •  Needs getting•  It got a LOT used to better…

    ×