Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Task to configure Git name and email #208

Open
eriksven opened this issue Oct 27, 2023 · 2 comments
Open

[Feature]: Task to configure Git name and email #208

eriksven opened this issue Oct 27, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@eriksven
Copy link

Description

It would be nice to easily configure the name and the email address to be used as part of a commit. When I perform an initial commit in a DevContainer with the Git-integration of VSCode for a new project in a new copy of the Eclipse Velocitas Template, it fails because the name and the email address have not been configured in Git yet.

So the user needs to manually sets this, e.g., by executing

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

Suggested Solution

Create a new task "Configure Git" which asks the user for a name and an email address and sets the git config accordingly.

Alternatives

Check during the boot of the container whether the name and email are set for Git. If it is not the case, ask the user for these values.
The advantage would be that the user does not do be aware of the existence of the task and will not run into the described problem during the commit.
However, I do not like this alternative because it may interrupt the boot process even in the unlikely case that the user does not want to perform any Git commits.

Additional Context

If you feel this is a useful addition, I would volunteer to try to build such a task.

@kse3hi
Copy link
Contributor

kse3hi commented Nov 2, 2023

Hi @eriksven, as alternative (or additional) environmental variables can be used.
PR: eclipse-velocitas/devenv-devcontainer-setup#45 - please check if this will be good alternative for you suggestion?

@kse3hi kse3hi moved this from 🆕 New to 🏗 In progress in Velocitas Backlog Nov 2, 2023
@kse3hi
Copy link
Contributor

kse3hi commented Nov 2, 2023

Hi @eriksven , please check the new behavior. To automatically apply your git name and email just create next local environmental variables:
GIT_CONFIG_NAME=<git_name>
GIT_CONFIG_EMAIL=<git_email>

Integration PR into the template: #213

@kse3hi kse3hi self-assigned this Nov 2, 2023
@kse3hi kse3hi moved this from 🏗 In progress to ✅ Done in Velocitas Backlog Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants