Git Command Line color settings

Posted here for convenience:

git config --global color.branch.remote "red bold"  
git config --global color.status.untracked "red bold"  
git config --global color.status.changed "red bold"  

This will change the dark red (which is unreadable on a black background) to a lighter shade.

Hat tip to

Git reference:


Might as well change the text editor for command-line operations as well...

git config --global core.editor "'C:\Program Files (x86)\Microsoft VS Code\code.exe' -w"  


You've committed a project but gitignore wasn't set. Once the gitignore is fixed, the following will give you a list of files that would have been ignored.

git ls-files --exclude-standard --ignored --directory  

(I piped the output of that command to a text file, then ran git rm --cached --ignore-unmatch <file> against all entries in that file.)

Update 3

Cross-platform projects may have long paths from Mac/Unix systems. To work with these in Windows, set a configuration flag:

git config --system core.longpaths true  

If you don't want to update system-wide, the following will set it local to the repo before the fetch:

git clone -c core.longpaths=true  
comments powered by Disqus