webworm
webworm

Reputation: 11019

Setting up TortoiseGit for multiple repositories

I like using TortoiseGit for source control but I remain confused on how to set it up for use with multiple repositories.

Assume I have two projects I am working on. One is hosted on Bitbucket and another is hosted with Visual Studio Team Services (was Visual Studio Online). Where is the login information for each repository stored? How do I change the settings such that one repository used one email address while a different repository uses another?

Inside the settings for TortoiseGit I only see one place to put an email address.

enter image description here

Upvotes: 2

Views: 5548

Answers (1)

MrTux
MrTux

Reputation: 34003

Ok, you seem to mix serveral aspects. Let me try to explain.

Commit meta data

Git requires a name and an email address for commit meta data. The settings page in the question shows exactly that. Here you can set up the name and email address which is used as the author and committer name of commits (this also might be needed for merges). These two settings are not used for authentication, they are just meta data for commits.

The global Settings dialog

The TortoiseGit settings dialog provides different configuration options depending on from where it is invoked. In your case it is invoked "globally" and is not associated to a specific repository. - You can see that there is no path shown in the title bar.

The working tree specific settings dialog

When the settings dialog is openend from a working tree, you see the path in the title bar and also some more options:

TortoiseGit settings dialog

For example you can see the new point "Remotes", there you can configure the remote repositories from which you can easily pull and fetch as well as push to. The "origin" remote repository is likely to be already filled in when you cloned a repository.

Normally, no credentials are stored here -- just the URL to the remote repository and maybe an SSH key. In order to store HTTPs credentials see TortoiseGit save user authentication / credentials, in order to clean up stored credentials see Remove saved credentials from TortoiseGit.

Besides that, on the "Git" page, there now is also the "Local" radio button enabled. This can be used when you want to use different user name and email address meta data for different working trees (the values set under Local will override the ones specified under Global). You can always click oin the "Effective" radio button to see the effective values for a specific working tree.

Upvotes: 1

Related Questions