Your SlideShare is downloading. ×
0
gitthe fast version control system
pull     pull       push                   pushpull                                 pull       pull            pull       ...
getting and creating      projects
configconfiguring your git environment
$ git config --global user.name “Your Name”$ git config --global user.email “name@domain.com”
$   git   config   --global   alias.st status$   git   config   --global   alias.ci commit$   git   config   --global   alias...
$ git config --global color.ui auto
$ git config --global apply.whitespace nowarn
$ git config --global core.editor “mate -w”
~/.gitconfig
initinitializes a directory as a git repository
.|--   COMMIT_EDITMSG|--   FETCH_HEAD|--   HEAD|--   ORIG_HEAD|--   branches|--   config|--   description|--   hooks|     ...
clonecopy a git repository
basic snapshotting
addadds file contents to the staging area
statusview the status of your files in the working directory and staging area
diffshows diff of what is staged and what is modified but unstaged
commitrecords a snapshot of the staging area
$ git commit -m ‘Fix commit msg’ --amend
reset
$ git reset --hard
$ git clean -dfclean.requireForce defaults to true
rmremove files from the staging area
mvrename files in the staging area
stashsaving temporarily local changes
branching and merging
branchlist, create and manage working contexts
alias “ co “
checkout
$   git   checkout   <branch>$   git   checkout   <tag>$   git   checkout   <commit>$   git   checkout   <file>
mergemerge a branch context into your current branch
logshow commit history of a branch
tagtag a point in history as important
sharing and updating      projects
remotelist, add and delete remote repository aliases
fetch, pull
Download objects and refs from another repository         $ git fetch <repo>         $ git fetch --all
$ git pull <repo> <branch>
push
$ git push <repo> <branch>
$ git push <repo> :<branch>
patch
$ git format-patch master --stdout > fix_bug.patch
$ git diff HEAD~1 > fix_bug.patch$ git apply fix_bug.patch
rebase
merge vs rebase
merge   rebase
reordering commits
$ git rebase -i HEAD~3
$ git pull --rebase
$ git config branch.master.rebase true$ git config branch.branch3.rebase true$ git config branch.autosetuprebase always$ git ...
$ git rebase --continue$ git rebase --abort
inspection and  comparison
log
$ git rev-list
diff
git              the fast version control system•   http://git-scm.com/•   http://gitready.com/•   http://gitref.org/•   h...
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Git
Upcoming SlideShare
Loading in...5
×

Git

708

Published on

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

No Downloads
Views
Total Views
708
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
42
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript of "Git"

    1. 1. gitthe fast version control system
    2. 2. pull pull push pushpull pull pull pull push
    3. 3. getting and creating projects
    4. 4. configconfiguring your git environment
    5. 5. $ git config --global user.name “Your Name”$ git config --global user.email “name@domain.com”
    6. 6. $ git config --global alias.st status$ git config --global alias.ci commit$ git config --global alias.co checkout$ git config --global alias.br branch
    7. 7. $ git config --global color.ui auto
    8. 8. $ git config --global apply.whitespace nowarn
    9. 9. $ git config --global core.editor “mate -w”
    10. 10. ~/.gitconfig
    11. 11. initinitializes a directory as a git repository
    12. 12. .|-- COMMIT_EDITMSG|-- FETCH_HEAD|-- HEAD|-- ORIG_HEAD|-- branches|-- config|-- description|-- hooks| |-- applypatch-msg| |-- commit-msg| |-- post-commit| |-- post-receive| |-- post-update| |-- pre-applypatch| |-- pre-commit| |-- pre-rebase| |-- prepare-commit-msg| `-- update|-- index|-- info| `-- exclude|-- logs| |-- HEAD| `-- refs|-- objects`-- refs |-- heads |-- remotes |-- stash `-- tags
    13. 13. clonecopy a git repository
    14. 14. basic snapshotting
    15. 15. addadds file contents to the staging area
    16. 16. statusview the status of your files in the working directory and staging area
    17. 17. diffshows diff of what is staged and what is modified but unstaged
    18. 18. commitrecords a snapshot of the staging area
    19. 19. $ git commit -m ‘Fix commit msg’ --amend
    20. 20. reset
    21. 21. $ git reset --hard
    22. 22. $ git clean -dfclean.requireForce defaults to true
    23. 23. rmremove files from the staging area
    24. 24. mvrename files in the staging area
    25. 25. stashsaving temporarily local changes
    26. 26. branching and merging
    27. 27. branchlist, create and manage working contexts
    28. 28. alias “ co “
    29. 29. checkout
    30. 30. $ git checkout <branch>$ git checkout <tag>$ git checkout <commit>$ git checkout <file>
    31. 31. mergemerge a branch context into your current branch
    32. 32. logshow commit history of a branch
    33. 33. tagtag a point in history as important
    34. 34. sharing and updating projects
    35. 35. remotelist, add and delete remote repository aliases
    36. 36. fetch, pull
    37. 37. Download objects and refs from another repository $ git fetch <repo> $ git fetch --all
    38. 38. $ git pull <repo> <branch>
    39. 39. push
    40. 40. $ git push <repo> <branch>
    41. 41. $ git push <repo> :<branch>
    42. 42. patch
    43. 43. $ git format-patch master --stdout > fix_bug.patch
    44. 44. $ git diff HEAD~1 > fix_bug.patch$ git apply fix_bug.patch
    45. 45. rebase
    46. 46. merge vs rebase
    47. 47. merge rebase
    48. 48. reordering commits
    49. 49. $ git rebase -i HEAD~3
    50. 50. $ git pull --rebase
    51. 51. $ git config branch.master.rebase true$ git config branch.branch3.rebase true$ git config branch.autosetuprebase always$ git pull --no-rebase
    52. 52. $ git rebase --continue$ git rebase --abort
    53. 53. inspection and comparison
    54. 54. log
    55. 55. $ git rev-list
    56. 56. diff
    57. 57. git the fast version control system• http://git-scm.com/• http://gitready.com/• http://gitref.org/• http://github.com/• http://bitbucket.org/• http://progit.org/• http://stackoverflow.com/• http://www.arthurkoziel.com/2008/05/02/git-configuration/• http://www.iconfinder.com/
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×