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

  • SEARCH
  • Home
  • 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 7904469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:05:15+00:00 2026-06-03T10:05:15+00:00

While developing, I will sometimes try a technique or method that doesn’t pan out

  • 0

While developing, I will sometimes try a technique or method that doesn’t pan out right away. Once I decide to move on to another task or try another technique for the same task, I’m never sure what to do with the non-working code. I want to keep it as a record of what I tried, so I know what didn’t work or even as a starting place for trying to make it work again.

Usually I just leave the code in place, commented out and uncommitted to VCS, for some length of time. This becomes a pain however as it clutters code and has to be dodged on VCS commits. I happen to be using git which has a “stash” function for temporary storage, but I’m not sure if that’s an appropriate use.

How do you handle code you want saved for posterity, but don’t want as part of your mainstream code base?

  • 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-06-03T10:05:17+00:00Added an answer on June 3, 2026 at 10:05 am

    Branches!

    1. Use branches liberally ( jQuery_slider_nivo, jQuery_slider_zurb, etc )
    2. You’re right that stash is not the place to be storing this code for a length of time
    3. If you want to check the code simply switch to that branch
    4. If you want it back in simply merge the branches

    Also you can perform archive operations ( $ = console ):

    1. Archive it: $ git checkout -b archive/<branchname> <branchname>
    2. Delete it: $ git branch -d <branchname>
    3. Restore it: $ git checkout -b <branchname> archive/<branchname>

    where <branchname> == TotallyAwesomeBranchName

    … or whatever you name your branches =]

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

Sidebar

Related Questions

I am currently developing an app that reads out SMS/Emails while driving. Many users
While developing an app I came to a point when I realized that I
While developing my app I have come to realize that the majority of my
While developing this solution, I learned that API V2 was being deprecated. I've since
I'm developing a CMS (with Django, but that doesn't matter) and have chosen GIT.
I've noticed an issue while developing my pages that's always bothered me: while Firefox
While developing TextToSpeech got a doubt that if we pause the activity how can
When I'm developing something that sends email, I sometimes don't want to actually send
While developing a C++ application, I had to use a third-party library which produced
While developing products, we often need to create proprietary tools to test some of

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.