Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. # git commit with add files
  2. $ git commit -am “[ Type in the commit message]”
  3.  
  4. # git diff -This command shows the file differences which are not yet staged.
  5. $ git diff
  6.  
  7. # git reset - This command discards all history and goes back to the specified commit
  8. $ git reset –-hard
  9.  
  10. # git status- This command lists all the files that have to be committed.
  11. $ git status
  12.  
  13. # git branch - List all Current local Branches
  14. $ git branch
  15.  
  16. # remote branch list
  17. $ git branch -r
  18.  
  19. # delete local Branch
  20. $ git branch -d [branch name]
  21.  
  22. # git checkout - This command is used to switch from one branch to another.
  23. $ git checkout [branch name]
  24.  
  25. # Create a new branch
  26. $ git checkout -b [branch name]
  27.  
  28. # git stash - This command temporarily stores all the modified tracked files.
  29. $ git stash save
  30.  
  31. # This command restores the most recently stashed files.
  32. $ git stash pop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement