Tuesday 1 March 2016

Git marmalade

As I recently discovered, one of Git's awesome 'hidden features' is that using several user accounts is more than their system will gracefully handle.

Committing from the same machine I used with another account generates commit messages for that previous account. A Gist explores the issue and this helped me fix the inappropriate commit.

In short, if you're worried about this:

  • Use git config user.name and git config user.email to check your "identity". 
  • Use git config user.name "John Doe" to update your user name (and likewise for e-mail)

Am I supposed to run a script whenever I switch account... ?

No comments:

Post a Comment