Please don’t set the email in the .gitconfig that gets created on fresh workspaces. I want the stock git warning stating that they need to be set at the creation of every workspace/project. It’s an excellent stop-gap to make sure the correct commit email is setup before pushing a given repo, especially in a hurry. In my case, the one the IDE plugs into the default .gitconfig is wrong. Previously, I’ve requested adding the ability to set an alternate email in the dashboard for this, but the simpler fix is to not set it in the first place.
On the other hand, for the people that have the correct email set, it’s just another step to go through every time they want to create a new workspace. I personally think it’s awesome that my .gitconfig gets filled in automatically, because it means I don’t have to do anything before I can start working on a project.
I think fixing the problem properly by allowing user.name and user.email to be set separately in the dashboard (maybe as part of a larger feature where we can customize what happens to the container after it’s created) would be better than breaking the functionality for everyone.
You can use init script to run bash scripts when workspace is created, see for this Init script example.
@anowlcalledjosh - I can understand that. For me, when weighing out the two options, I feel like having to set the email isn’t a big deal. Replacing the wrong email in a repo is (as I have to rewrite the commit history.) If it’s not set to begin with then that problem rarely happens and I can still setup the email easy enough. If it is setup to begin with, I spare myself a small annoyance, in exchange for a decent probability of forgetting it needs to be changed, and then having to rewrite the history to fix (instead of the coding I set out to do.)
As for breaking functionality, there may be as many that would prefer the .gitconfig not setup as those that would prefer it already setup. If it’s a decent chunk it may be worth changing.
An account-wide setting flag like, “Automatically setup .gitconfig on creation.” may be a fair middle ground as both use cases would be covered. People that want to keep the functionality could leave it on. Those that don’t could turn it off, and adding a check for a flag would probably be a small cost for a larger improvement in quality. (Maybe. I’m assuming that’s done with JS and not something when firing up a Docker container.)
@ergose init script will work similar to a account-wide setting flag
[ -f ~/initialized ] || echo > ~/.gitconfig && touch ~/initialized as shown in the link above, and it will delete autogenerated gitconfig on all of your workspaces.
I’m assuming that’s done with JS and not something when firing up a Docker container.
it’s done with js, when creating the Docker container