Nathaniel Schweinberg       @nathanielks    FightTheCurrent.org
What the git?
git is a Source ControlManagement application   It keeps track of your code!
git stores only the changes         you make
git allows you to focuson the feature you’re        writing
http://hades.name/blog/2010/01/22/git-your-friend-not-foe-vol-2-branches/
git allows multiple developers to    work on the same project
http://git-scm.com/about/distributed
How to get started!
Step 1: Install git      http://git-scm.com/book/en/Getting-Started-Installing-Git
Step 2: OPEN TERMINAL
Step 3: Get it set up      http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup
How git works          http://git-scm.com/about/staging-area
git initInitializes a git repository      in current folder
git add .   Adds file . to the staging area( . means current folder and all files inside )
git commit –m ‘initial commit’ Commits files added to staging area       ( -m adds commit message )
git statusShows current status of  working directory
http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository
BRANCHING
Branching encourages     a few thingsFrictionless Context Switching   Feature Based Workflow Disposable Experimentation   ...
git branch nameCreate new branch to work from
git checkout branchname Sets working tree to branchname
git checkout –b branchnameCreate and checkout into branchname
git merge branchnameMerges committed changes made in branchname with current branch
Repositories!
Let’s add a remote repository
Two basic actions    git push              git pullPushes changes to    Pulls changes from   remote repo          remote r...
Let’s integrate with   WordPress!
git cloneUse git clone to duplicatea remote repository locally
Submodules!  Submodules allow you to keep separatesections of your code under source control            ( repos within rep...
git submodule add         repository      path/to/locationAdds submodule located at repository to    path/to/location with...
.gitignoreUse .gitignore to prevent filesfrom being added to the repo
Let’s Talk strategy
Commit early,Commit Often
Use descriptive commit     messages!
Master branch is stable       ONLY.Always develop on a separate branch
Branch naming:initials/feature-name    ns/some-cool-feature
Working with multiple       Devs
git rebase branchnameUpdates current branch with changes made               in another
Resources:http://bit.ly/WhatTheGit
Nathaniel Schweinberg       @nathanielks    FightTheCurrent.org
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
What the Git? - WordCamp Atlanta
Upcoming SlideShare
Loading in …5
×

What the Git? - WordCamp Atlanta

769 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
769
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

What the Git? - WordCamp Atlanta

  1. 1. Nathaniel Schweinberg @nathanielks FightTheCurrent.org
  2. 2. What the git?
  3. 3. git is a Source ControlManagement application It keeps track of your code!
  4. 4. git stores only the changes you make
  5. 5. git allows you to focuson the feature you’re writing
  6. 6. http://hades.name/blog/2010/01/22/git-your-friend-not-foe-vol-2-branches/
  7. 7. git allows multiple developers to work on the same project
  8. 8. http://git-scm.com/about/distributed
  9. 9. How to get started!
  10. 10. Step 1: Install git http://git-scm.com/book/en/Getting-Started-Installing-Git
  11. 11. Step 2: OPEN TERMINAL
  12. 12. Step 3: Get it set up http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup
  13. 13. How git works http://git-scm.com/about/staging-area
  14. 14. git initInitializes a git repository in current folder
  15. 15. git add . Adds file . to the staging area( . means current folder and all files inside )
  16. 16. git commit –m ‘initial commit’ Commits files added to staging area ( -m adds commit message )
  17. 17. git statusShows current status of working directory
  18. 18. http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository
  19. 19. BRANCHING
  20. 20. Branching encourages a few thingsFrictionless Context Switching Feature Based Workflow Disposable Experimentation http://git-scm.com/about
  21. 21. git branch nameCreate new branch to work from
  22. 22. git checkout branchname Sets working tree to branchname
  23. 23. git checkout –b branchnameCreate and checkout into branchname
  24. 24. git merge branchnameMerges committed changes made in branchname with current branch
  25. 25. Repositories!
  26. 26. Let’s add a remote repository
  27. 27. Two basic actions git push git pullPushes changes to Pulls changes from remote repo remote repo
  28. 28. Let’s integrate with WordPress!
  29. 29. git cloneUse git clone to duplicatea remote repository locally
  30. 30. Submodules! Submodules allow you to keep separatesections of your code under source control ( repos within repos )
  31. 31. git submodule add repository path/to/locationAdds submodule located at repository to path/to/location within project
  32. 32. .gitignoreUse .gitignore to prevent filesfrom being added to the repo
  33. 33. Let’s Talk strategy
  34. 34. Commit early,Commit Often
  35. 35. Use descriptive commit messages!
  36. 36. Master branch is stable ONLY.Always develop on a separate branch
  37. 37. Branch naming:initials/feature-name ns/some-cool-feature
  38. 38. Working with multiple Devs
  39. 39. git rebase branchnameUpdates current branch with changes made in another
  40. 40. Resources:http://bit.ly/WhatTheGit
  41. 41. Nathaniel Schweinberg @nathanielks FightTheCurrent.org

×