I have a bit of trouble to understand your question but I try:
If you add a file to svn:ignore
, it's ignored by SVN. So there should be no need to backup or restore it before/after a commit. Are you sure you didn't add those file accidentally? SVN ignores files in svn:ignore
but if you do svn add ignorefile.bak
the file will be added to the repository.
The same is true for git. It also has an ignore file but you can still force add a file.
That said, you should never have files in your project that are not committed. Either the file is important, then you should commit it. If that would disrupt the work of others, commit it under a different name (say arched.config
instead of project.config
). Otherwise, it will be very hard for another user to maintain the software. Or for yourself, if your PC suddenly dies.
If the file is unrelated to the project, it should not be in the project at all. Put it somewhere else.
And with Git, you even have another option: You can create a branch that contains the file just like it contains any other file. Name that branch "archeg-work". Now you can always work on this branch and the project will work out of the box. Just clone it and no further changes are necessary.
When you're happy with your work, merge the changes back into the master branch. Unlike with SVN, branching really works with Git. Linus Torvalds merges thousands of branches every day without problems.