Branches ============================================ ### Adding Branches * local: `git checkout -b ` * remote: `git push --set-upstream ` * track remote: `git checkout --track /` ### Deleting Branches * local: `git branch -d ` * remote: `git push -d ` * realize remote deletes: `git remote prune ` ### Non-Standard Activities * merge only a single file into another branch `git checkout -- ` * delete from repo and file system `git rm ` * set current branch to track remote `git branch -u /` Config ============================================= * set line ending behaviour `git config --global core.autocrlf true` this should force git to checkout code using OS default line endings * store credentials `git config credential.helper store` or `git config credential.helper cache` .gitignore ================================================ [Git - gitignore Documentation (git-scm.com)](https://git-scm.com/docs/gitignore) * `.obsidian/` ignores the .obsidian directory to untrack files `git rm --cached .\.vscode\`