Advertisement
FadhilUrl

CheetSheet GIT

Feb 19th, 2021 (edited)
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. + multiple account git in multiple other repo
  2. - make new folder git init then setting "git config user.name alfatayah" and "git config user.email fadhil.alfatayah@gmail.com"
  3. - run this script git config --global credential.useHttpPath true
  4. - git clone or push in new repo dan akan muncul pop up login auth di git
  5.  
  6.  
  7. + reference : https://koukia.ca/how-to-remove-local-untracked-files-from-the-current-git-branch-571c6ce9b6b1
  8. + delete file untracked
  9. - git clean -f
  10. + delete directories untracked
  11. - git clean -fd
  12.  
  13. + https://www.nobledesktop.com/learn/git/undo-changes
  14. + Reset all file change
  15. - git revert 2f5451f --no-edit (push)
  16. - git reset --soft HEAD~ (not push)
  17.  
  18. + https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/#:~:text=Deleting%20a%20branch%20LOCALLY&text=Delete%20a%20branch%20with%20git%20branch%20%2Dd%20.&text=The%20%2Dd%20option%20will%20delete,branch%20is%20now%20deleted%20locally.
  19. + Delete branch local
  20. - git branch -d <branch>.
  21.  
  22. git remote url
  23. Add url
  24. + git remote add origin git@github.com:User/UserRepo.git
  25. Change URL
  26. + git remote set-url origin https://github.com/alfatmha/it-asset.git
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement