From 354043a8971c526db82d2232551e511fd1aa154c Mon Sep 17 00:00:00 2001 From: Mridul Aggarwal Date: Thu, 25 Oct 2018 23:58:24 +0530 Subject: [PATCH] add a bunch of useful git configuration options --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index e397e5f..49b3c7c 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,15 @@ Similar to finishing a feature branch, a hotfix branch gets merged into both `ma `git push origin staging` +## Useful git configuration +Git configuration can help you a lot with the projects. Here are a few useful options- +* `push.default=current` - When typing `git push` without any branch name, it will push the current branch automatically. +* `core.excludesfile=~/.gitignore` - Useful to create a global .gitignore file. +* `core.autocrlf=input` - Helps to set the line-endings to the unix standard. Useful for anyone who might have windows-style line-endings for some reason. +* `pull.rebase=true` - Automatically rebase if needed, when doing a fast-forward pull from remote. +* `help.autocorrect=50` - If you make a spelling mistake in the git command, git will automatically guess which command you wanted to run, and run it for you correctly. + + ## Summary - A `staging` branch is created from `master`