Synchronize remote and local
# Note that there is a dot "."
git rm -r --cached .
git add -A
git commit -m "update .gitignore"
Simple .gitignore example
# This is a comment - will be ignored by Git
# Ignore all files ending in .a
*.a
# Except lib.a
*
!lib.a
# Only ignore TODO files in the root directory of the project, excluding subdir/TODO
/TODO
# Ignore all files in the build/ directory
build/
# will ignore doc/notes.txt but not doc/server/arch.txt
doc/*.txt
# will ignore all txt files in doc/, including subdirectories (**/ Since Git 1.8.2, the **/ matching mode is supported, which means recursively matching files in subdirectories)
doc/**/*.txt
How to delete the local warehouse in GIT
Just delete the hidden .git folder under the warehouse folder
rm -rf .git