Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion: How to make local changes to a file *never* check in, but have it sync with remote anyway?

Tags:

svn

I have a file with local changes that should never sync back to the repository because it's for my local installation only. But if that same file is changed in the repo, I want those changes to update my local copy, anyway.

At the moment, the file in question always shows up in the list of changes when I want to check-in my changes, and I have to manually exclude it from the check-in. How do I make it so that I can just update, with the above restriction in place?

Thanks :)

like image 348
Niels Heidenreich Avatar asked Jan 05 '11 10:01

Niels Heidenreich


1 Answers

If you are using TortoiseSVN you can add that file to the 'ignore-on-commit' changelist.

This is different to svn:ignore. The file will be versioned (i.e. it will exist in the repository), you will get updates to it when updating but, when you commit, this file will show up in a separate list and unchecked by default. You can still commit the file but it is much more difficult to accidentally commit it.

I use this feature for database config files that need to be locally modified but not commited.

See documentation here: (search for ignore-on-commit) http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-changelists.html http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-commit.html

like image 176
tato Avatar answered Nov 01 '22 21:11

tato