Did a bunch of wrong work, should I keep it?

Posted by Droogans on Programmers See other posts from Programmers or by Droogans
Published on 2012-11-28T22:34:33Z Indexed on 2012/11/28 23:14 UTC
Read the original article Hit count: 145

Filed under:
|

I have forked a repo and branched that clone to code a story, and because I didn't understand the problem, wrote code that isn't solving my task at hand, but may prove useful later.

Should I:

  1. Delete it, and don't worry about it. Then commit without the extra code.
  2. Make yet another branch for just that work, commit it, but don't post a pull request on it.
  3. Just commit it with the existing code, and worry about the extra "fluff" later.

I was thinking #2. If I understand correctly, I could just keep the extra code on a branch I never use on my clone, and dig it up later if something comes up that may benefit from using it.

© Programmers or respective owner

Related posts about version-control

Related posts about teamwork