How do I avoid checking in local changes to the SVN repository?

后端 未结 8 987
有刺的猬
有刺的猬 2021-01-05 08:19

I have to make local changes to my project files in order to get it to run in a different environment. Twice now I accidentally checked those changes in (and messed up ever

相关标签:
8条回答
  • 2021-01-05 09:05

    I can't think of any uncomplicated way to do this. Is there no way to dynamically check (within your files/scripts) which environment you are in, and make the settings accordingly? I used to do that in PHP with a simple directory check (if working directory equals C:\projects... then set path to ... )

    Another option could be a pre-commit hook that excludes or reverts the changed files but in the former case, you would not be up to date, and in the latter, you'd have to make the changes again... hmmm.

    0 讨论(0)
  • 2021-01-05 09:06

    You could use git-svn. You get a local repo in which you can have local history, and several opportunities to consider your sins before inflicting them on the svn repo.

    0 讨论(0)
提交回复
热议问题