Tips and Tricks for Git
Git Submodules
// 1. Add submodule to a new repogit submodule add https://github.com/chaconinc/DbConnector
// 2. Updating repo with new submodulegit pullgit submodule update --init --recursive
// 2. Or Cloning repo with new submodulegit clone --recurse-submodules https://github.com/chaconinc/MainProject
// 3. Pulling repo with submodulesgit pull --recurse-submodules
by git
Delete branch locally and remotely
// 1. locallygit branch -d localBranchName
// 2. remotegit push origin :remoteBranchName
by FreeCodeCamp
Apply .gitignore to committed files
// Edit your .gitignore with the file to ignore and rungit rm --cached /path/to/file
by SO
Git ignore file mode (chmod) changes
// Only current repogit config core.fileMode false
// Generalgit config --global core.fileMode false
by SO