Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 1.46 KB

File metadata and controls

49 lines (39 loc) · 1.46 KB

Git Configuration

Git allows you to configure your environment at three levels: system, global, and local. The .gitignore file also acts as a configuration file for telling Git what files to ignore.

Set your name and email

Configuring your identity is the first thing you should do after installing Git. Every commit uses this information.

git config $scope user.name "$name"
git config $scope user.email "$email"

View your current configuration

If you need to see what variables are set (like aliases or default editors), you can list them out.

git config --list $scope

Ignore an untracked file

It is easy to accidentally commit built binaries or cache files. You can quickly append them to your .gitignore file.

echo "$file" >> .gitignore