Set up git configuration:
- Global gitignore file.
run touch ~/.gitignore
to create .gitignore
file.
now add below lines:
echo ".idea" >> ~/.gitignore
echo ".vscode" >> ~/.gitignore
echo ".php_cs.cache" >> ~/.gitignore
git config --global core.excludesfile '~/.gitignore'
- Global User Email/Name:
Obviously email/name should be yours.
git config --global user.email "bhushangaykawad@gmail.com"
git config --global user.name "Bhushan"
- Global Core Editor:
git config --global core.editor "vim"
- Git Credential Store:
git config --global credential.helper cache
- Git pull stratergy to fast forward only (Only available in GIT 2.27 and above)
git config --global pull.ff only