Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Git Workshop : Getting Started


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Git Workshop : Getting Started

  1. 1. Git Workshop What is an “Estimate” ? Wildan Maulana [email_address] #1
  2. 2. About Version Control Local Version Control Systems Centralized Version Control Systems
  3. 3. About Version Control Distributed Version Control Systems
  4. 4. A Short History of Git Linux kernel maintenance 1991–2002 Changes to the software were passed around as patches and archived files 2002 The Linux kernel project began using a proprietary DVCS system called BitKeeper. 2005 The relationship between the community that developed the Linux kernel and the commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked 2005 Git birth - Speed - Simple design - Strong support for non-linear development (thousands of parallel branches) - Fully distributed - Able to handle large projects like the Linux kernel efficiently (speed and data size)
  5. 5. Git Basics Snapshots, Not Differences . Other systems tend to store data as changes to a base version of each file. Git stores data as snapshots of the project over time.
  6. 6. Git Basics Nearly Every Operation Is Local
  7. 7. Git Basics Git Has Integrity
  8. 8. Git Basics Git Generally Only Adds Data
  9. 9. Git Basics The Three States Working directory, staging area, and git directory.
  10. 10. The Basic Git Workflow <ul><li>You modify files in your working directory.
  11. 11. You stage the files, adding snapshots of them to your staging area.
  12. 12. You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory. </li></ul>
  13. 13. Installing Git <ul><li>Installing from Source
  14. 14. Installing on Linux
  15. 15. Installing on Mac
  16. 16. Installing on Windows </li></ul>
  17. 17. First-Time Git Setup gitconfig <ul><li>/etc/gitconfig file: Contains values for every user on the system and all their repositories. If you pass the option --system to git config, it reads and writes from this file specifically.
  18. 18. ~/.gitconfig file: Specific to your user. You can make Git read and write to this file specifically by passing the --global option.
  19. 19. config file in the git directory (that is, .git/config ) of whatever repository you’re currently using: Specific to that single repository. Each level overrides values in the previous level, so values in .git/config trump those in /etc/gitconfig . </li></ul>
  20. 20. First-Time Git Setup Your Identity $ git config --global “Ibnu Sina&quot; $ git config --global
  21. 21. First-Time Git Setup Your Editor $ git config --global core.editor emacs
  22. 22. First-Time Git Setup Your Diff Tool $ git config --global merge.tool vimdiff
  23. 23. First-Time Git Setup Checking Your Settings $ git config --list http.proxy= Sina core.editor=emacs merge.tool=vimdiff $ git config Ibnu Sina
  24. 24. First-Time Git Setup Getting Help $ git help <verb> $ git <verb> --help $ man git-<verb> $ git help config #git or #github channel on the Freenode IRC server (
  25. 25. Summary <ul><li>You should have a basic understanding of what Git is and how it’s different from the CVCS you may have been using. You should also now have a working version of Git on your system that’s set up with your personal identity. It’s now time to learn some Git basics. </li></ul>
  26. 26. Reference <ul><li>ProGit, Scott Chacon, Apress </li></ul>