Phil CK

Git - Local Config

Last updated on

Often on a work machine I might do some hobby work, but I don’t really want the work Git config in my history.

% git config

If you are on a nix type machine you can see the config here.

% cat ~/.gitconfig
  name = Your Name
  email =
  repositoryformatversion = 0
  etc ...

There is a way around this that might be quite useful, for one off checkouts like a blog or some lunchtime practice.

git clone your_hobby_repo
cd your_hobby_repo
cd .git
cat config

Here you can see the config setting for this local repo. You can edit this file and add a user setting.

  name = Your Name
  email =

Now when you call git config you should see your personal email address.