0
BOOST YOUR DEV TEAM’S SPEED
AND PRODUCTIVITY
Duy Lam .::. Aug 2013
© 2013 KMS Technology 1
AGENDA
© 2013 KMS Technology 2
Git
Introduction
Branch in Git Remote Git Git Practices
ABOUT ME
Software Architect
at KMS Technology Vietnam
duylam@kms-technology.com
http://vn.linkedin.com/in/duylamphuong
© 2...
WHAT YOU TAKE IN THE END
Git
Use Git
Use Git Effectively
Git for advanced needs
Git or else?
© 2013 KMS Technology 4
AGENDA
© 2013 KMS Technology 5
Git
Introduction
Branch in Git Remote Git Git Practices
VERSION CONTROL SYSTEM TYPES
© 2013 KMS Technology 6
Centralized Version
Control System
Distributed Version
Control System
THREE GIT TRAITS
#1 COMMITS ARE SNAPSHOT
© 2013 KMS Technology 7
THREE GIT TRAITS
#2 WORK WITHOUT NETWORK
© 2013 KMS Technology 8
THREE GIT TRAITS
#3 TWO STATES
© 2013 KMS Technology 9
Working Directory Git Repository
git add
git rm
etc.
git commit
Git...
BASIC WORKS
(DEMO)
 Create new git repository
 Work on git staging area
 Update git repository
 Check status
 Undo
© ...
AGENDA
© 2013 KMS Technology 11
Git
Introduction
Branch in Git Remote Git Git Practices
BRANCH AND HOW IT WORKS
© 2013 KMS Technology 12
1 2
3
4
MERGING BRANCH
FAST FORWARD
© 2013 KMS Technology 13
git merge hotfix
MERGING BRANCH
NON FAST FORWARD
© 2013 KMS Technology 14
git merge iss53
AGENDA
© 2013 KMS Technology 15
Git
Introduction
Branch in Git Remote Git Git Practices
REMOTE URLS
© 2013 KMS Technology 16
Local /data/git/project.git
SSH*
user@server:project.git
Git git://server/project.git...
REMOTE BRANCH
© 2013 KMS Technology 17
Time
REMOTE TRACKING BRANCH
 a local branch associated with remote branch
© 2013 KMS Technology 18
> git branch --track [branc...
UPDATE WITH REMOTE REPOSITORY
GET CHANGES #1
© 2013 KMS Technology 19
Time
git fetch origin
UPDATE WITH REMOTE REPOSITORY
GET CHANGES #2
© 2013 KMS Technology 20
Time
git pull origin
master
origin/master
UPDATE WITH REMOTE REPOSITORY
SAVE CHANGES
© 2013 KMS Technology 21
masterorigin/master
git.ourcompany.com
Time
master
mas...
BASIC WORKS
(DEMO)
 Create remote git repository
 Get new commits from remote repository
 Save new commits to remote re...
AGENDA
© 2013 KMS Technology 23
Git
Introduction
Branch in Git Remote Git Git Practices
HIGHLIGHT OF GIT FEATURES
(DEMO)
 git tag
 git stash
 git submodule
© 2013 KMS Technology 24
GIT CLIENTS
 http://git-scm.com: Git CLI (command line
interface)
 UI clients
– TortoiseGit
– SmartGit
– SourceTree Free...
GIT OR SVN ?
Speed of operation Faster
Data loss Less
Independent and isolated environment Yes
Access control Yes
Locking ...
GIT PRACTICES
 Line-ending issue on platforms
 Do not miss any file when committing in
conflicted merge
© 2013 KMS Techn...
GIT PRACTICES
© 2013 KMS Technology 28
 Prefer --no-ff option on merging
© 2013 KMS Technology
THANK YOU
© 2013 KMS Technology 29
Thank You
Upcoming SlideShare
Loading in...5
×

Git - Boost Your DEV Team Speed and Productivity

869

Published on

At the tech talks hosted by ITViec, Mr. Duy Lam - Software Architect of KMS Technology delivered a topic of Git - a free and open source distributed control system.

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

No Downloads
Views
Total Views
869
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
12
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide
  • A commit contains:changes at the time it’s createda pointer to parent commit containing unchanged thingscommit ID is a hex string for hashed content
  • Staging Area ~ temporary storage managed by Git
  • Go through following commands:gitinitgit add, rm, mvgit commitgit commit –amendgit log, status, diffgit reset, checkout (undo + go to commit)
  • Branch ~ pointer to a commitHEAD ~ alias for latest commit in branch
  • remote branch is controlled by git fetch + git pushgit clone by default creates a master remote branch
  • Update configuration to allow pushing: $ gitconfigreceive.denyCurrentBranch ignoregit clonegit fetch (+ pull)git push
  • speed of operation: commit, viewing history, reverting changes, etc.data loss: SVN can have corrupted revision databaseindependent and isolated: Git allows user to work without network connection and keep their work privatelylock mechanims: plays an important role when it comes to non-mergable binary files such as graphic assetsaccess control: define read/write permission on particular folder, allow to work on particular folder instead of getting entire tree
  • Line-ending issueWindows: convert CRLF to LF when commit, and convert LF to CRLF when checkout to file systemLinux: convert CRLF to LF when commit onlyDo not miss: if you miss any file, it means changes in that files from the branch you’re merging will be discarded
  • Transcript of "Git - Boost Your DEV Team Speed and Productivity"

    1. 1. BOOST YOUR DEV TEAM’S SPEED AND PRODUCTIVITY Duy Lam .::. Aug 2013 © 2013 KMS Technology 1
    2. 2. AGENDA © 2013 KMS Technology 2 Git Introduction Branch in Git Remote Git Git Practices
    3. 3. ABOUT ME Software Architect at KMS Technology Vietnam duylam@kms-technology.com http://vn.linkedin.com/in/duylamphuong © 2013 KMS Technology 3 Lâm Phương Duy
    4. 4. WHAT YOU TAKE IN THE END Git Use Git Use Git Effectively Git for advanced needs Git or else? © 2013 KMS Technology 4
    5. 5. AGENDA © 2013 KMS Technology 5 Git Introduction Branch in Git Remote Git Git Practices
    6. 6. VERSION CONTROL SYSTEM TYPES © 2013 KMS Technology 6 Centralized Version Control System Distributed Version Control System
    7. 7. THREE GIT TRAITS #1 COMMITS ARE SNAPSHOT © 2013 KMS Technology 7
    8. 8. THREE GIT TRAITS #2 WORK WITHOUT NETWORK © 2013 KMS Technology 8
    9. 9. THREE GIT TRAITS #3 TWO STATES © 2013 KMS Technology 9 Working Directory Git Repository git add git rm etc. git commit Git Index / Staging Area
    10. 10. BASIC WORKS (DEMO)  Create new git repository  Work on git staging area  Update git repository  Check status  Undo © 2013 KMS Technology 10
    11. 11. AGENDA © 2013 KMS Technology 11 Git Introduction Branch in Git Remote Git Git Practices
    12. 12. BRANCH AND HOW IT WORKS © 2013 KMS Technology 12 1 2 3 4
    13. 13. MERGING BRANCH FAST FORWARD © 2013 KMS Technology 13 git merge hotfix
    14. 14. MERGING BRANCH NON FAST FORWARD © 2013 KMS Technology 14 git merge iss53
    15. 15. AGENDA © 2013 KMS Technology 15 Git Introduction Branch in Git Remote Git Git Practices
    16. 16. REMOTE URLS © 2013 KMS Technology 16 Local /data/git/project.git SSH* user@server:project.git Git git://server/project.git HTTP http://server/project.git (*) Setup authentication: https://help.github.com/articles/generating-ssh-keys
    17. 17. REMOTE BRANCH © 2013 KMS Technology 17 Time
    18. 18. REMOTE TRACKING BRANCH  a local branch associated with remote branch © 2013 KMS Technology 18 > git branch --track [branch] [remote name]/[branch]
    19. 19. UPDATE WITH REMOTE REPOSITORY GET CHANGES #1 © 2013 KMS Technology 19 Time git fetch origin
    20. 20. UPDATE WITH REMOTE REPOSITORY GET CHANGES #2 © 2013 KMS Technology 20 Time git pull origin master origin/master
    21. 21. UPDATE WITH REMOTE REPOSITORY SAVE CHANGES © 2013 KMS Technology 21 masterorigin/master git.ourcompany.com Time master masterorigin/master git push origin
    22. 22. BASIC WORKS (DEMO)  Create remote git repository  Get new commits from remote repository  Save new commits to remote repository © 2013 KMS Technology 22
    23. 23. AGENDA © 2013 KMS Technology 23 Git Introduction Branch in Git Remote Git Git Practices
    24. 24. HIGHLIGHT OF GIT FEATURES (DEMO)  git tag  git stash  git submodule © 2013 KMS Technology 24
    25. 25. GIT CLIENTS  http://git-scm.com: Git CLI (command line interface)  UI clients – TortoiseGit – SmartGit – SourceTree Free – Git Extensions © 2013 KMS Technology 25
    26. 26. GIT OR SVN ? Speed of operation Faster Data loss Less Independent and isolated environment Yes Access control Yes Locking mechanisms Yes Storage space 1/30 size © 2013 KMS Technology 26
    27. 27. GIT PRACTICES  Line-ending issue on platforms  Do not miss any file when committing in conflicted merge © 2013 KMS Technology 27 Windows Mac & Linux Problem rn n Solution git config --global core.autocrlf true git config --global core.autocrlf input
    28. 28. GIT PRACTICES © 2013 KMS Technology 28  Prefer --no-ff option on merging
    29. 29. © 2013 KMS Technology THANK YOU © 2013 KMS Technology 29 Thank You
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×