Mehdi Darabi
Mehdi Darabi

Reputation: 43

Set git user as already existing user in a project

I'm working on a project in a company and I have a git user in my PC there. Now while I'm working remotely and I have cloned the project I want to set my user in my laptop as the same git user but I don't know how. Will having same email address and name in my laptop do the job?

Thank you

Upvotes: 2

Views: 101

Answers (2)

mnestorov
mnestorov

Reputation: 4484

Yes it will. If you specify the same name and email in your .gitconfig, while working on the same project, there will be no difference between working from your company or working remote.

You can both have a general user, found in $HOME/.gitconfig, or per project user, found in your project, under .git/config.

Upvotes: 2

Ivan
Ivan

Reputation: 1455

In each computer, you should:

git config --global user.name "<username>"
git config --global user.email <mail>
git config --global core.autocrlf input

With the same data.

Upvotes: 1

Related Questions