Last active
August 13, 2018 11:44
-
-
Save AhmedHelalAhmed/5295a3587485fb073b2e7c96e61524e3 to your computer and use it in GitHub Desktop.
Git commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| If you want to change the user use that command | |
| $ git config user.name "John Doe" | |
| $ git config user.email "[email protected]" | |
| => shortcuts for me: ((gita & gitc)) | |
| check ..... https://github.com/AhmedHelalAhmed/Helper-Bash-Scripts | |
| //============================================// | |
| change the email and user namd globally | |
| $ git config --global user.name "John Doe" | |
| $ git config --global user.email "[email protected]" | |
| //============================================// | |
| friend with no account use | |
| git commit --author="John Doe <[email protected]>" | |
| //============================================// | |
| git reset RSH --hard ............. back to previous state | |
| git push -f origin master ........... force update | |
| //============================================// | |
| change the editor for git | |
| git config --global core.editor "/snap/bin/subl" | |
| //============================================// | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
source
https://www.git-tower.com/learn/git/faq/change-author-name-email
https://medium.com/@therajanmaurya/git-push-pull-with-two-different-account-and-two-different-user-on-same-machine-a85f9ee7ec61
https://stackoverflow.com/questions/10564/how-can-i-set-up-an-editor-to-work-with-git-on-windows