Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4236658
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:40:12+00:00 2026-05-21T02:40:12+00:00

The problem I just accidentally committed a change to a file that was only

  • 0

The problem

I just accidentally committed a change to a file that was only meant to help debug a problem. As a result, I rather messed up the current version of our software, because I accidentally disabled important functionality :-(.

Since this is not the first time this happened (and I’m not the only one it happened to), my question:

Is there a practical mechanism to prevent accidental commits of changes you don’t want committed?

I’m thinking of changes where you already know you don’t want to commit them when you make them (such as modifications to help debugging or testing).

My current approach:

Usually I just mark such changes with a // FIXME: DEBUG, so they get listed and highlighted in Eclipse. However this is not enough, as I can still commit these files.

I’d like some mechanism that tells Subversion “do not commit this file in this state” – maybe a special comment or some file property (like “lock this file for commits”). Is there any such mechanism?

The only solution I can think of would be to have a pre-commit hook that scans for special comments, but I’d like to avoid having to configure stuff server-side if I can help it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T02:40:13+00:00Added an answer on May 21, 2026 at 2:40 am

    You could add a pre-commit hook to subversion that checks for a specific subversion property, e.g. mycompany:dontcommit.

    You could then set this property on the local file, and the subversion server will reject the file if you ever try to commit it.

    We have been using this system for some time, and believe me, it has save me a couple of times. 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I accidentally added and committed a file with the wrong name. No problem. Tortoise
This just won't work. The problem is that I do not know enough to
it seems that I just solved my problem why I couldn't use the ASP.NET
Ok, so I just ran into the following problem that raised an eyebrow. For
Just a small SVN problem here. I setup my own SVN server Setting up
I've just encountered a weird problem, I'm trying to printf an integer variable, but
I figure this problem is easier than just a regular spell checker since the
I've just started to use linq to sql and have run into a problem
I've just started doing some PowerShell scripting, and I'm running into a problem testing
Maybe I'm just thinking about this too hard, but I'm having a problem figuring

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.