Git Cheat Sheet - Paprikas/rails_cheat_sheet GitHub Wiki

GIT CONFIG

Define the author name to be used for all commits by the current user.

git config --global user.name <name>

Define the author email to be used for all commits by the current user.

git config --global user.email <email>

Create shortcut for a Git command. E.g. alias.glog “log --graph--oneline” will set ”git glog” equivalent to ”git log --graph--oneline

git config --global alias. <alias-name> <git-command>

Set text editor used by commands for all users on the machine. arg should be the command that launches the desired editor (e.g., vi).

git config --system core.editor <editor>

Open the global configuration file in a text editor for manual editing.

git config --global --edit

Source https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet

Remove file from the work tree

git update-index --skip-worktree config/database.yml

Check SSH authentication

ssh -T [email protected]

⚠️ **GitHub.com Fallback** ⚠️