krlaboratories

GIT commands cheatsheet

Jan 3rd, 2022
562
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.05 KB | None | 0 0
  1. Git Clone:
  2. git clone https://name-of-the-repository-link
  3.  
  4. Git New branch, list, deleting:
  5. git branch -b (branch name)
  6. git branch or git branch --list
  7. git branch -d
  8.  
  9. Git Checkout:
  10. git checkout (branch name)
  11.  
  12. Git Switch:
  13. git switch means you have already created branch.
  14. git switch (branch name)
  15.  
  16. Git Status Command for:
  17. like current branch, commit, push or pull, files staged, unstaged or untracked, files created, modified or deleted
  18. git status
  19.  
  20. Git Add:
  21. git add
  22. git add -A (for everything)
  23.  
  24. Git Commit:
  25. git commit -m "commit message
  26.  
  27. Git Push: for upload local repo content
  28. git push: it is commonly used to upload local repository content to a remote repository.
  29. git push --set-upstream: Branch 'branch Name' set up to track remote branch 'branch Name' from 'origin'.
  30. git push -u origin: For push working existing branch .
  31. git push
  32. git push --set-upstream
  33. git push -u origin
  34.  
  35. Git Pull: for git fetch from local repo which will merge branch
  36. git pull
  37.  
  38. Git Merge: for merge branch to another
  39. git checkout (branch name)
  40. git fetch
  41. git merge
Advertisement
Add Comment
Please, Sign In to add comment