Skip to content

Instantly share code, notes, and snippets.

@AhmedHelalAhmed
Last active August 13, 2018 11:44
Show Gist options
  • Select an option

  • Save AhmedHelalAhmed/5295a3587485fb073b2e7c96e61524e3 to your computer and use it in GitHub Desktop.

Select an option

Save AhmedHelalAhmed/5295a3587485fb073b2e7c96e61524e3 to your computer and use it in GitHub Desktop.
Git commands
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"
//============================================//