Fill these in once
- Set your name for every project
git config --global user.name "Alex Smith" - Set your email for every project
git config --global user.email "alex@example.com"Use the same email as your GitHub account, so your commits are linked to you.
- Use a different email in this project only
git config user.email "alex@example.com"Run it inside the project folder. It wins over the global one.
- Fix the author of your last commit
git commit --amend --reset-author --no-editOnly before you push it.
Check it worked
- Check the last commit's author
git log -1 --format="%an <%ae>"
- Set your name for every project
git config --global user.name "Alex Smith" - Set your email for every project
git config --global user.email "alex@example.com"Use the same email as your GitHub account, so your commits are linked to you.
- Use a different email in this project only
git config user.email "alex@example.com"Run it inside the project folder. It wins over the global one.
- Fix the author of your last commit
git commit --amend --reset-author --no-editOnly before you push it.
Check it worked
- Check the last commit's author
git log -1 --format="%an <%ae>"
- Set your name for every project
git config --global user.name "Alex Smith" - Set your email for every project
git config --global user.email "alex@example.com"Use the same email as your GitHub account, so your commits are linked to you.
- Use a different email in this project only
git config user.email "alex@example.com"Run it inside the project folder. It wins over the global one.
- Fix the author of your last commit
git commit --amend --reset-author --no-editOnly before you push it.
Check it worked
- Check the last commit's author
git log -1 --format="%an <%ae>"