Friday, March 9, 2018

github user set localy for the project

Often git user that I use on my machine is related with the company that I am working for. Sometimes I need to access my personal repositories to get some useful code, snipped or component that I can use. Sometimes during this process I modify something in that component and I want to push it to github as me and not as a different git user. Important part is to set local git preferences for the project; following commands are useful:

git config -llist all the config for git
git config -l --locallist config that is specific for given project
git config -l --globallist global configuration

Edit local config, set github username and email address to the one that is used in github.
git config -e --local

Set following fields:
 email = 
 name = FirstName LastName 

No comments: