Ask coding questions

← Back to all posts
.gitignore alternative?
h
slickassassin03 (94)

Is there any way to omit the .env file from a GitHub commit?

Answered by AdCharity (1317) [earned 5 cycles]
View Answer
Comments
hotnewtop
AdCharity (1317)

I don't believe so. The best way to do not upload a file would be to not connect your project to a repo and just manually upload the files yourself the hard way. (Basically don't connect the repl project to github and nothing happens)

slickassassin03 (94)

@AdCharity Okay, I'll just wait until we get a more complete GitHub panel to connect to a repo.

AdCharity (1317)

@slickassassin03 yeah I think if you bother the moderators/actual workers, they'll try to implement the feature if it gathers enough support.

slickassassin03 (94)

@AdCharity How might we do that? I'm pretty new to socializing with the Repl community.

AdCharity (1317)

@slickassassin03 well honestly, there are a couple options:
1) there is a discord (should be on the bottom left corner of the screen) for repl
2) if you find a user with a moderator tag, mention them with @[repl name], which will notify them (probably shouldn't, but if it is important...)
3) ask a question like this one. If it gathers enough votes, repl will most likely see it. Unfortunately, it's likely not a whole lot of people will upvote (since they are middle schoolers interested in games and not git hub)
If I missed something here, I'm pretty sure the longer you stay in the community, the sooner you'll find it.

slickassassin03 (94)

@AdCharity Thanks, I'll join their Discord and maybe they'll think about omission from commits.

PaoloAmoroso (186)

I've let Repl.it's Jeremy know about the issue as he's working on the new version control features.

PaoloAmoroso (186)

@UltiRequiem Let's ask @replitjeremy whether there are any updates.

lemonke (1)

put it in rice.

PaoloAmoroso (186)

@slickassassin03 @UltiRequiem I don't know about .gitignore but now Repl.it does the right thing for .env and GitHub.

When you create or edit .env, the built-in version control system doesn't detect any changes to a REPL's code base and has nothing to commit to GitHub. I checked.

LyndenSylver (0)

@PaoloAmoroso Are you saying that's a way to do a .gitignore w/o having a .gitignore? By using a .env to omit certain file types instead?

PaoloAmoroso (186)

@LyndenSylver I meant that Replit now doesn't commit the .env file to GitHub.

slickassassin03 (94)

Thank you for any help!