My Git configuration, comprising the following three files.
The Git configuration file includes aliases & other niceties that support my preferred workflow.
The global Git ignore file transcends all project types, and may provide a degree of insulation from the absence of a .gitignore
file in a particular repository. It does not, however, preclude the use of a project-specific .gitignore
file. As a starting point for those, consider reference .gitignore
files maintained by either GitHub or gitignore.io.
The attributes file maps attributes to paths. At the time of this writing, it may only prove useful if you choose to incorporate support for diff-ing either .plist
or .strings
files.
In all likelihood you will already have files in place for this purpose; in that case, simply integrate excerpts into your existing configuration. Otherwise, you can incorporate them in one of the following methods:
- Copy each file to
~/.config/git
.
- Move
config
to~/.gitconfig
. - Move
ignore
to~/.global_ignore
and enter the following at the command line:git config --global core.excludesfile ~/.global_ignore
. - Move
attributes
to~/.gitattributes
and enter the following at the command line:git config --global core.attributesfile ~/.gitattributes
.
- Documentation for
git-config
- Documentation for
gitignore
- Documentation for
gitattributes
- The
subup
alias and use of the OS X credential helper were influenced by Jonathan Wight.