SVN Remove file from commiting, but not deleting it?

EDIT: Original issue solved, new question

I have a variable in my index.php file that needs to be set to 'development' locally, but stay set to 'production' in the repo. Is there a way I can have this file not commit this change to the repo, but not remove it from the repo completely?

2 Replies

Wrong way to solve the problem. Why don't you have separate config files, one for production and one for dev, for those settings that depend on the deployment environment?

Then you can use environ variables on the server(s) with php's getenv() to define which one to load.

edit: or you can simply define your single var depending on the getenv() instead of having separate config files.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct