blitz icon indicating copy to clipboard operation
blitz copied to clipboard

Wrong commit user after creating a new app

Open noxify opened this issue 3 years ago • 3 comments

What is the problem?

After running the blitz new command, the generated code will be commited to git. The user who did this is not myself, it's https://github.com/hng63

I would expect that my own user is used to make the initial commit. Or alternative Blitz.JS CLI is used as user as defined in the code: https://github.com/blitz-js/blitz/blob/main/packages/generator/src/generators/app-generator.ts#L269-L280

Paste all your error logs here:

...

Paste all relevant code snippets here:

...

What are detailed steps to reproduce this?

  1. Run blitz new test-app and follow the instructions
  2. Create a repo at github and push the changes to the remote repo ( or create the remote repo directly via VSCode )
  3. check the commit history / contributor list

Run blitz -v and paste the output here:

....

Please include below any other applicable logs and screenshots that show your problem:

  • https://github.com/noxify/blitz-hackernews/graphs/contributors
  • https://github.com/noxify/blitz-international-issue/graphs/contributors

noxify avatar Sep 04 '22 14:09 noxify

I think I've seen someone else with this issue before.

Can you try rm -rf .git then running git init ?

itsdillon avatar Sep 06 '22 18:09 itsdillon

Hi @dillonraphael,

yes this solves the issue.

After running blitz new blitz-issue-3818: Bildschirmfoto 2022-09-07 um 09 20 05

After deleting the .git directory and running git init (+commit): Bildschirmfoto 2022-09-07 um 09 20 57

Maybe we could just remove the -c properties from the command to use the default git config ( = current user name + email )?

What do you think?

noxify avatar Sep 07 '22 07:09 noxify

Maybe we could just remove the -c properties from the command to use the default git config ( = current user name + email )?

I agree that we should do this. Was also proposed here: https://discord.com/channels/802917734999523368/983844288645464064/987303992629530646 and https://discord.com/channels/802917734999523368/802990045849714688/1001064240133709834

beerose avatar Sep 12 '22 13:09 beerose