Git Workshop : Getting Started

Download Git Workshop : Getting Started

Post on 17-May-2015

659 views

Category:

Technology

9 download

Embed Size (px)

TRANSCRIPT

<ul><li> 1. Git Workshop What is an Estimate ?Wildan Maulana [email_address] http://workshop.openthinklabs.com #1</li></ul> <p> 2. About Version Control Local Version Control Systems Centralized Version Control Systems 3. About Version Control Distributed Version Control Systems 4. A Short History of Git Linux kernel maintenance 19912002 Changes to the software were passedaround as patches and archived files 2002 The Linux kernel project began using a proprietaryDVCS system called BitKeeper. 2005 The relationship between the community thatdeveloped the Linux kernel andthe commercial company that developedBitKeeper broke down,and the tools free-of-chargestatus was revoked 2005 Gitbirth - Speed - Simple design - Strong support for non-lineardevelopment (thousands of parallel branches) - Fully distributed - Able to handle large projects likethe Linux kernel efficiently (speed and data size) 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. Git Basics Nearly Every Operation Is Local 7. Git Basics Git Has Integrity 8. Git Basics Git Generally Only Adds Data 9. Git Basics The Three States Working directory, staging area, and git directory. 10. The Basic Git Workflow</p> <ul><li>You modify files in your working directory.</li></ul> <p> 11. You stage the files, adding snapshots of them to your staging area. 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. 13. Installing Git </p> <ul><li>Installing from Source</li></ul> <p> 14. Installing on Linux 15. Installing on Mac 16. Installing on Windows 17. First-Time Git Setup gitconfig </p> <ul><li>/etc/gitconfigfile: Contains values for every user on the system and all their repositories. If you pass the option--systemto git config, it reads and writes from this file specifically.</li></ul> <p> 18. ~/.gitconfigfile: Specific to your user. You can make Git read and write to this file specifically by passing the--globaloption. 19. config file in the git directory (that is,.git/config ) of whatever repository youre currently using: Specific to that single repository. Each level overrides values in the previous level, so values in.git/configtrump those in/etc/gitconfig . 20. First-Time Git Setup Your Identity $ git config --global user.name Ibnu Sina" $ git config --global user.email ibnusina@openthinklabs.com 21. First-Time Git Setup Your Editor $ git config --global core.editor emacs 22. First-Time Git Setup Your Diff Tool $ git config --global merge.tool vimdiff 23. First-Time Git Setup Checking Your Settings $ git config --list http.proxy= user.email=ibnusina@openthinklabs.com user.name=Ibnu Sina core.editor=emacs merge.tool=vimdiff $ git config user.name Ibnu Sina 24. First-Time Git Setup Getting Help $ git help $ git --help $ man git- $ git help config #git or #github channel on the Freenode IRC server (irc.freenode.net) 25. Summary </p> <ul><li>You should have a basic understanding of what Git is and how its different from the CVCS you may have been using. You should also now have a working version of Git on your system thats set up with your personal identity. Its now time to learn some Git basics. </li></ul> <p> 26. Reference </p> <ul><li>ProGit, Scott Chacon, Apress </li></ul>