#Git help

9 messages · Page 1 of 1 (latest)

frozen locust

Hey guys, let’s say hypothetically you have a private github and you wanna make it public but you have your .env file uploaded, how can I, once the .env is added to the .gitignore, remove all commit history of the .env file to make sure no one has any api keys etc?

spark timberBOT
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
  • Marked as resolved by OP
junior ledge

Can't be much of a help, but I suggest creating new repo & rotate your env variables as I am pretty sure, they are accessible no matter what through commit history

easiest & reliable solution I suppose.

visual raft

Is it of any importance to you to keep commit history at all? If not then new repository and commit current state of your private repository without .env as initial commit sounds best for me too

frozen locust

yh what i was gonna do

i don't want the commit history as people can go back to see the .env file's contents?

junior ledge

Don't have link to it anymore, that's just an advice though

frozen locust

Ok, i got you