View on GitHub

CPNV-ES

The CPNV-ES Learning Path


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

Windows Install

choco install gitflow-avh

macOS Install

brew install git-flow-avh

Best practices for Git Commit (source)

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line (“If applied, this commit will your subject line here”)
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how

Advanced usage

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