Skip to content
.gitignore alternative?
Profile icon
slickassassin03

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

You are viewing a single comment. View All
Answered by AdCharity [earned 5 cycles]
View Answer
Profile icon
PaoloAmoroso

@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.

Profile icon
LyndenSylver

@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?

Profile icon
PaoloAmoroso

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