1

(Note not a copy of 80 Multiple github accounts on the same computer? )

In our lab we are using Git+Github to store the software controlling the measurement setup. Most of the time we are working on the actual setup to live test the code we made.

Because different users are using the same computer it would be nice to quickly change the github account so that commits are attributed to the correct user.

As the guides listed on the GitHub site of the question above are no longer valid I was wondering what the best workflow would be to do this.

The main criterium is that once it is set up it should be easy to switch between accounts.

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
Adriaan Rol
  • 420
  • 2
  • 4
  • 12

1 Answers1

0

One option is to use the --author attribute as detailed in

https://stackoverflow.com/a/3696994/631619

Another option is to consider removing any [user] section from the ~/.git_config file (or just remove the entire file) for any individual (note that the file is in an individuals home - ~ - directory) who may be submitting from multiple accounts so it is never defaulted for them and is always prompted for.
At the command line this can be done with:

git config --global user.email ""
Community
  • 1
  • 1
Michael Durrant
  • 93,410
  • 97
  • 333
  • 497