Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dead-Simple Version Control for your Team

Dead-Simple Version Control for your Team

How we use Git and Github to build stuff at Grand Valley State University Libraries

Matthew Reidsma

July 25, 2012
Tweet

More Decks by Matthew Reidsma

Other Decks in How-to & DIY

Transcript

  1. GIT

  2. GIT

  3. $cd MyAwesomeApp $git init Initialized empty Git repository in /MyAwesomeApp/.git/

    $git add . $git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # #! new file: index.html # $touch index.html
  4. $git commit -m “First commit” [master (root-commit) 7ce2952] First commit

    1 file changed, 2 insertions(+) create mode 100644 index.html
  5. $git commit -m “First commit” $git remote add origin [email protected]:gvsulib/

    awesomeapp.git [master (root-commit) 7ce2952] First commit 1 file changed, 2 insertions(+) create mode 100644 index.html
  6. $git commit -m “First commit” $git remote add origin [email protected]:gvsulib/

    awesomeapp.git [master (root-commit) 7ce2952] First commit 1 file changed, 2 insertions(+) create mode 100644 index.html $git push origin master
  7. $cd MyAwesomeApp $git checkout newFeature $git branch newFeature <!-- AWESOME

    FEATURE ADDING ACTION HERE --> Switched to branch ‘newFeature’
  8. $cd MyAwesomeApp $git checkout newFeature $git add . $git branch

    newFeature <!-- AWESOME FEATURE ADDING ACTION HERE --> Switched to branch ‘newFeature’
  9. $cd MyAwesomeApp $git checkout newFeature $git add . $git status

    # On branch newFeature # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # #! modified: index.html # $git branch newFeature <!-- AWESOME FEATURE ADDING ACTION HERE --> Switched to branch ‘newFeature’
  10. $git commit -m “Best feature ever” $git checkout master [newFeature

    18q7d58] Best feature ever 1 file changed, 1 insertions(+) Switched to branch ‘master’
  11. $git commit -m “Best feature ever” $git checkout master [newFeature

    18q7d58] Best feature ever 1 file changed, 1 insertions(+) $git merge newFeature Switched to branch ‘master’ Updating 7ce2952..18q7d58 index.html | 1 + 1 file changed, 1 insertion(+)
  12. $ssh [email protected] $git cd MyAwesomeApp remote: Counting objects: 1, done.

    remote: Compressing objects: 100% (1/1), done. remote: Total 1 (delta 21), reused 1 (delta 14) Unpacking objects: 100% (1/1), done. $git mkdir MyAwesomeApp $git clone https://github.com/gvsulib/ awesomeapp.git Cloning into awesomeapp...
  13. BUT

  14. log

  15. RESOURCES John Fink: A Gentle Introduction to Modern Version Control

    http://acrl.ala.org/techconnect/?p=1191 Flashbake - automated git for writers http:/bitbucketlabs.net/flashbake Download git http://git-scm.com Git Reference http://gitref.org Git and Github Bootcamp http://help.github.com/articles/set-up-git