Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. GIT CHEAT SHEET
  2.  
  3. git config --list - Ispiši sve konfiguracijske ključeve i vrijednosti
  4.  
  5. git config --global <key> <value> - Postavi globalni ključ na drugu vrijednost
  6.  
  7. git status - Provjeri status repozitorija
  8.  
  9. git add [file|folder] (--all) - Dodaj izmjene u staging (sa --all dodaj sve)
  10.  
  11. git commit -m “[message]” - Commita izmjene uz poruku
  12.  
  13. git checkout -b [branch] - Kreira novi branch i ulazi u njega
  14.  
  15. git checkout [branch] - Ulazi u branch
  16.  
  17. git branch -D [branch] - Briše branch
  18.  
  19. git push [remote] [branch] - Pusha promjene s lokalnog brancha na remote branch. Dodaj --force ako želiš pregaziti remote sa svojim branchem.
  20.  
  21. git pull [remote] [branch] - Pulla promjene s lokalnog brancha na remote branch. Dodaj --force ako želiš pregaziti svoj branch sa remote branchem.
  22.  
  23. git log - Prikazuje commit history
  24.  
  25. git log --all --decorate --oneline --graph - Prikazuje graf s commitovima
  26.  
  27.  
  28. Ako napraviš glupost, idi na http://ohshitgit.com/.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement