There is a point to this story, but it has temporarily escaped my mind...
Contact Me MyFaceBook MyLinkedIn MyGitHub MyTwitter

Set an Email Address on Specific Repositories

When I work with some clients or employers, they will sometimes provide me with an email address to identify me within their system and source control. If they provide the computer to work on and keep a local repository, I'll have their identity configured on that computer as global identity. Sometimes, they do not provide a computer or I'll work on the code on one of my personal computers in addition to their computer. In those cases, I don't want my personal identity to show up on the commit history of their repository since they've taken the time to create an identity for me. Git provides an easy way to specify an email address on a per repository basis.

To set the email address (identity) in a specific repository, use the following commands while in the local repository directory:

git config user.name "Julian Easterling"
git config user.email "identity@example.com"

Alternatively, you can edit the .git/config file manually and add the required information under the [user] heading:

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
	hideDotFiles = dotGitOnly
[remote "origin"]
	url = https://git@example.com/project.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master
[user]
	name = Julian Easterling
	email = identity@example.com
Copyright © 2019 by Julian Easterling. SOME RIGHTS RESERVED.
Privacy Policy              Terms of Use             


Creative Commons License
Except where otherwise noted, content on this site is
licensed under a Creative Common Attribution-Share Alike 4.0 International License.


All of the opinions expressed on this website are those of Julian Easterling and
do not represent the views of any of my current and previous clients or employers in any way.

If you notice an error on the site or content that has not been properly attributed, bring
it to my attention using the contact page and I will endeavor to fix it as soon as I can.

I accept no responsibility or liability for any damages incurred by following any of
my advice or by using any of the information on my site or of those sites that I link to.