2 min episode 10 of 18
User Profiles come in handy when you have multiple committer identities. Maybe one for work, one for personal projects, perhaps another one for open source contributions. With User Profiles, you can easily manage them and switch them for your commits.
Let’s first take a look at how to configure a new committer identity in Tower.
You can manage User Profiles in the Settings: just open the Settings dialog and then switch to the User Profiles tab. Let’s add a new committer identity by clicking on the plus sign. Then we’ll add a title, a user name and the email address.
You can also add a GPG key here if you are using one. Then click Create and voilà - we’ve just added a brand new committer identity.
In this same view, it is also possible to Edit an existing profile or delete it by clicking on the minus sign.
Now that we have prepared the new committer identity, let’s see User Profiles in action.
If you want to set a certain profile for a repository, you can do so by going to the “Settings” view in that repository’s sidebar. Then, click on the avatar to select a different profile. You can also hover over the field to reveal the Edit button, if you want to edit an existing profile.
Next, let’s look at how to set a certain profile just for a particular commit.
I have prepared some changes which I want to commit using a different identity.
In the commit area, we can see our current committer identity. Just by clicking on the avatar, we will see all the configured committer identities. We can now select the one we need for this particular commit.
To finish our commit, let’s enter a commit message and click Commit. Now we can go to our HEAD branch and check the last commit. In the commit details we can verify that we successfully applied the selected committer identity to just this one commit.