* different name and email address depending on folder
@ 2011-01-08 0:52 Rich Eakin
2011-01-08 7:39 ` Ramkumar Ramachandra
0 siblings, 1 reply; 4+ messages in thread
From: Rich Eakin @ 2011-01-08 0:52 UTC (permalink / raw)
To: git
Hi,
I am using git for development with a company and myself on the same computer and the name / user fields need to be different for each. As I keep all my company's repos in one directory and my private stuff in another, I was wondering if there is a way to tell git to use a separate user and email whenever I make commits from within a specified directory.
If anyone can tell me how to do this, or some other way to achieve my needs, I am very thankful.
Best Regards,
Rich
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: different name and email address depending on folder
2011-01-08 0:52 different name and email address depending on folder Rich Eakin
@ 2011-01-08 7:39 ` Ramkumar Ramachandra
2011-01-08 8:16 ` Rich Eakin
0 siblings, 1 reply; 4+ messages in thread
From: Ramkumar Ramachandra @ 2011-01-08 7:39 UTC (permalink / raw)
To: Rich Eakin; +Cc: git
Hi Rich,
Rich Eakin writes:
> I am using git for development with a company and myself on the same computer and the name / user fields need to be different for each. As I keep all my company's repos in one directory and my private stuff in another, I was wondering if there is a way to tell git to use a separate user and email whenever I make commits from within a specified directory.
Yes. Please see the 'user.name' and 'user.email' configuration options
in git-config(1). You can set them globally or on a per-repository
basis.
-- Ram
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: different name and email address depending on folder
2011-01-08 7:39 ` Ramkumar Ramachandra
@ 2011-01-08 8:16 ` Rich Eakin
2011-01-08 8:29 ` Ramkumar Ramachandra
0 siblings, 1 reply; 4+ messages in thread
From: Rich Eakin @ 2011-01-08 8:16 UTC (permalink / raw)
To: Ramkumar Ramachandra, git
I am currently using git-config in a bash script to set my user / email. I was wondering if it was possible to tell git that if I am in a certain directory to use a specific user / email other than what is in my global config.
On 08/01/2011, at 6:39 PM, Ramkumar Ramachandra wrote:
> Hi Rich,
>
> Rich Eakin writes:
>> I am using git for development with a company and myself on the same computer and the name / user fields need to be different for each. As I keep all my company's repos in one directory and my private stuff in another, I was wondering if there is a way to tell git to use a separate user and email whenever I make commits from within a specified directory.
>
> Yes. Please see the 'user.name' and 'user.email' configuration options
> in git-config(1). You can set them globally or on a per-repository
> basis.
>
> -- Ram
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: different name and email address depending on folder
2011-01-08 8:16 ` Rich Eakin
@ 2011-01-08 8:29 ` Ramkumar Ramachandra
0 siblings, 0 replies; 4+ messages in thread
From: Ramkumar Ramachandra @ 2011-01-08 8:29 UTC (permalink / raw)
To: Rich Eakin; +Cc: git
Hi Rich,
Rich Eakin writes:
> I am currently using git-config in a bash script to set my user / email. I was wondering if it was possible to tell git that if I am in a certain directory to use a specific user / email other than what is in my global config.
It's possible on a per-repository basis, as I pointed out in the last
email; but no- I don't think it's possible on a per-directory basis
within the same repository. You might consider separting your private
work from your company's repository.
p.s- I think you've used the term "global" incorrectly here. Global
configuration applies to all repositories. Per-repository
configuration overrides the global configuration for that repository.
-- Ram
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-08 8:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-08 0:52 different name and email address depending on folder Rich Eakin
2011-01-08 7:39 ` Ramkumar Ramachandra
2011-01-08 8:16 ` Rich Eakin
2011-01-08 8:29 ` Ramkumar Ramachandra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).