Git notes

by Jerry Sky

Notes on Git.

1. Removing a commit

First, remove the commit from local repository using a command like git reset --soft [commit]^. Then, if necessary force-push to remote repository e.g. GitHub to remove that commit from there as well.

Further reading


2. Removing a file from git history

Follow the tutorial here.

Also consider re-signing the commits as seen here.


3. Fix displaying file names with unicode characters in them

For some odd reason git doesn’t properly display non-ASCII characters (exotic characters e.g. ö or ę) in file and directory names. To fix it execute:

git config --global core.quotePath false