I'm using git on my desktop computer with user name defined in --global. Now I would like to checkout project as other user. But when I did commit I found that it is done by my main user.
I did init and set local user:
git init
git config --local user.name "user2"
git config --local user.email "[email protected]"
I did clone
$ git clone https://[email protected]/xxx/tst.git
Did changes, commit and push:
git add *
git commit -m "aaa"
git push
In bitbucket webpage I found that commit was done by main user. How to make commit as local user?