- instantly share code, notes, and snippets
- check ignored files
git status --ignored
- add files to be ignored
- local:
touch .gitignore
(in the git repo) - global:
git config --global core.excludesfile ~/.gitignore_global
(anywhere, just open the terminal) - common
.gitignore
configurations
- local:
- commit or not
.gitignore
- people have different preferences/opinions!
- error message:
Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.
rm -f .git/index.lock
# remove theindex.lock
file from the.git
dir
haha