Git Cards - Powerpoint Format

1,878 views

Published on

Deck for studying up on Git commands.

This was purposefully kept free of any styling etc as this is the actual deck I use for memorization and don't like distractions.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,878
On SlideShare
0
From Embeds
0
Number of Embeds
42
Actions
Shares
0
Downloads
33
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Git Cards - Powerpoint Format

  1. 2. git init <ul><li>Initialize a new git repo in the current working directory. </li></ul>
  2. 3. git clone <clone_url> <ul><li>Clone an existing git repo. </li></ul>
  3. 4. git log <ul><li>Show history of changes. </li></ul>
  4. 5. git diff <ul><li>Show changes to tracked files. </li></ul>
  5. 6. git status <ul><li>Show a list of changed files in the working directory. </li></ul>
  6. 7. git add <path/file> <ul><li>Add a new file to the current repo. </li></ul>
  7. 8. git add . <ul><li>Stage all new files and changes to tracked files for the current repo. </li></ul>
  8. 9. git add -u <ul><li>Stage all removed files and changes to tracked files for the current repo. </li></ul>
  9. 10. git add -A <ul><li>Stage all added files, removed files and changes to tracked files for the current repo. </li></ul>
  10. 11. git commit -a <ul><li>Commit all your local changes. </li></ul>
  11. 12. git commit --amend <ul><li>Amend your most recent commit with the current changes. </li></ul>
  12. 13. git tag v1.0 <ul><li>Mark a version or milestone. </li></ul>
  13. 14. git pull --rebase <ul><li>Fetch from origin and fast forward your changes on top of it. </li></ul>
  14. 15. git push <ul><li>Push committed to changes to origin. </li></ul>
  15. 16. git reset --hard <ul><li>Discard all uncommitted changes in your working tree. Cannot be undone. </li></ul>
  16. 17. git checkout <path/file> <ul><li>Reset an individual file back to HEAD. </li></ul>
  17. 18. git checkout <branch_name> <ul><li>Switch branches. </li></ul>
  18. 19. git branch <ul><li>List all local branches for the current repo. </li></ul>
  19. 20. git branch -r <ul><li>List all remote branches for the current repo. </li></ul>
  20. 21. git branch -d <branch> <ul><li>Delete a local branch. </li></ul>
  21. 22. git branch -d -r <branch> <ul><li>Delete a remote branch. </li></ul>
  22. 23. git checkout branch2 git merge branch1 git merge branch1 <ul><li>Merge branch1 into branch2 </li></ul>
  23. 24. git checkout -b new_branch old_branch <ul><li>Create new_branch based on old_branch and switch to it. </li></ul>
  24. 25. git stash <ul><li>Stash uncommitted changes in current working tree. </li></ul>
  25. 26. git stash pop <ul><li>Apply stashed changes to current working tree. </li></ul>

×