Home > Blockchain >  Initializing git user for projects
Initializing git user for projects

Time:10-24

Do I need to initialize a git user and email each time I want to work on a new project? What if I want to continue work on an existing project? I am very new to git

CodePudding user response:

git config --global user.name "John Doe"
git config --global user.email [email protected]

You just need to enter these two lines to get user and email globally. This will automatically apply to your project each and every time. So you will not need to initialize each time.

CodePudding user response:

The first thing you should do when you install Git is to set your user name and email address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating:

$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]

Again, you need to do this only once if you pass the --global option, because then Git will always use that information for anything you do on that system. If you want to override this with a different name or email address for specific projects, you can run the command without the --global option when you’re in that project.

Many of the GUI tools will help you do this when you first run them. You can learn more about git in git documentation

  • Related