Intro to Git   Why and How
What is Git?• Distributed Version Control system (DVC)• Used/Developed by maintainers of Linux  Kernel (Linus Torvalds)• F...
What is Version Control?•   Snapshots changes in a corpus of text/files    •   e.g. “track revisions” in MS Word•   Allows ...
What is DVC?• Distributed Version Control   Remote          Remote       Remote       Push/Pull                    You
How do I get started?• Initialize a Git project  • git init .  • This creates a .git folder which stores the    git index ...
How do I track changes?• Change your files then add them to your  change set •   git add . or git add somefile• Check out wh...
Working with others•   Add a remote host (if starting out)    •   Github is free and very good    •   git remote add hostn...
Merging/Branching•   Allows working on multiple versions in parallel    •   git branch somenewbranch    •   git checkout s...
Questions?• Checkout http://www.github.com• GUIS: • http://mac.github.com/ • http://code.google.com/p/tortoisegit/
Upcoming SlideShare
Loading in …5
×

Intro to git

1,036 views

Published on

Short talk I game to the ICEWS group

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

  • Be the first to like this

No Downloads
Views
Total views
1,036
On SlideShare
0
From Embeds
0
Number of Embeds
296
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Intro to git

    1. 1. Intro to Git Why and How
    2. 2. What is Git?• Distributed Version Control system (DVC)• Used/Developed by maintainers of Linux Kernel (Linus Torvalds)• Fast and Efficient Branching/Merging• Great hosted services for offsite repositories (e.g. github.com)
    3. 3. What is Version Control?• Snapshots changes in a corpus of text/files • e.g. “track revisions” in MS Word• Allows multiple people to edit corpus• Can be used for anything that changes over time • Software • CV • Legal Documents
    4. 4. What is DVC?• Distributed Version Control Remote Remote Remote Push/Pull You
    5. 5. How do I get started?• Initialize a Git project • git init . • This creates a .git folder which stores the git index (amongst other things)• Add something to the project • git add . • git commit -m “first checkin”
    6. 6. How do I track changes?• Change your files then add them to your change set • git add . or git add somefile• Check out what has happened • git status (shows current changeset) • git log (shows recent commits)
    7. 7. Working with others• Add a remote host (if starting out) • Github is free and very good • git remote add hostname hosturl• Push your changes • git push hostname branchname• You can also ‘git clone’ a remote host if it already exists • git pull
    8. 8. Merging/Branching• Allows working on multiple versions in parallel • git branch somenewbranch • git checkout somenewbranch• Can push/pull on each branch independently• Finish a branch by merging back to the source branch (or elsewhere) • git merge somenewbranch • N.B. this merges somenewbranch into your current branch
    9. 9. Questions?• Checkout http://www.github.com• GUIS: • http://mac.github.com/ • http://code.google.com/p/tortoisegit/

    ×