I'll be updating this post with new
tips and tricks
aboutgit
as my personal list of useful commands and configurations.
Rename file
git mv --force myfile MyFile
Setup git local/global config
git config --global user.name 'myusername'
git config --global user.email 'email@myemail.com'
git config --global core.editor 'nano'
Add an empty directory to a Git repository
# Ignore everything in this directory
*
# Except this file
!.gitignore
Ignore everything except a few files
# Ignore everything
*
# But not these files...
!.gitignore
!myfile.md