Git
Git config
Once per dev machine, configure git with the following:
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git config --global core.autocrlf false
Remember to always use a text editor configured with LF newlines. Special care on Windows which the default is CR-LF.
Git Flow
- A successful Git branching model
- Gitflow Workflow
- GitFlow: la méthodologie et la pratique
- GitFlow CheatSheet
- git-flow commands VS raw git commands
Windows Install
choco install gitflow-avh
macOS Install
brew install git-flow-avh
Best practices for Git Commit (source)
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line (“If applied, this commit will your subject line here”)
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
Advanced usage
- Rules to Git By (Explaining git internal structure, rebase vs merge, bisect)
- CS Visualized: Useful Git Commands
External resources
What should be left OUT?
- All generated files
- All dependencies managed through a package manager
- All local config files
- Your personal IDE config files
- Big binary files (.psd, .zip, …)
node_modules
- https://byjoeybaker.com/why-you-should-never-commit-node-modules-in-nodejs
- https://flaviocopes.com/should-commit-node-modules-git/
- https://www.positronx.io/should-i-commit-the-node_modules-folder-to-git/
- https://stackoverflow.com/questions/18128863/should-node-modules-folder-be-included-in-the-git-repository