These go into GIT_DIRECTORY/.gitignore Also checkout an extensive collection of gitignore repository here : https://github.com/github/gitignore For Generic project we ignore backup files (*~) and vim swap file (.swp), MacOS dir file (.DS_Store) and any file with .out extension (a.out ..etc) .gitignore ## generic files to ignore *~ *.lock *.DS_Store *.swp *.out For Rails project We ignore the sqlLi