Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git multiple user names for the different projects within the same system [duplicate]

Tags:

git

git-config

People also ask

Can you have multiple projects in one repository?

Yes. You can put multiple projects in one Git repository but they would need to be on different branches within that repo. The Git console in ReadyAPI gives you the ability to create or switch branches from the UI.

Can a repository have multiple owners?

You can only add collaborators to your repository. It cannot be "co-owned". The only way for doing what you want is to fork the repo and collaborate through pull requests. Note that you can create an organization ( https://github.com/account/organizations/new ) and achieve a bit of what you want.


Just use --local instead of --global. In fact, local is the default so you can just do

git config user.email [email protected]
git config user.name "whatf hobbyist"

in one repo, and

git config user.email [email protected]
git config user.name "whatf at work"

in another repo

The values will then be stored in in the .git/config for that repo rather than your global configuration file.


Omit the --global from your call to git config:

git config user.name "A. U. Thor"

This will set the property in the current repository.