Git config
Sign commits
Initial config
- set remote connection via ssh (no https)
git remote set-url origin [git@gitlab.com (mailto:git@gitlab.com):project/file.git
- set global info
git config --global user.name "Bob Doe"
git config --global user.email "[bob.doe@doe.org](mailto:bob.doe@doe.org)" (--local for a specific repo)
- set prune as default
git config --global fetch.prune true
Check config
- check SSH connection
ssh -Tv user.name@email.com
- check git config
git config --list
git config --local user.email (check the email for the current repo)
Ignore .DS_Store files globaly
git config --global core.excludesfile ~/.gitignore
echo .DS_Store >> ~/.gitignore
Skip committing a file but getting the remote changes
git update-index --skip-worktree core/config/config.cfg