Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm struggling to phrase this question correctly, hence the poor title.

Basically I have a simple Chrome extension that I am developing for work. It is in use at the moment and as I am using it regularly I am constantly thinking of improvements or extra features it could have.

My file structure is like this (I'm on a mac)

~/Sites/Chrome_extensions/{my employers name}/CharCounter/

CharCounter/ contains all the files needed for the Chrome extension.

Whenever I am happy with a new version of my extension I pack it in Chrome and the resulting .crx file is called CharCounter_{version number}.crx

So for example, the most recent is called CharCounter_1.3.3.crx. However, the development folder currently always has the same name. If I want to roll back and continue developing a previous version I can't.

I have decided to start using git however I'm unsure how to tackle my version control.

Should I set up my git repository in

~/Sites/Chrome_extensions/{my employers name}

then when I decide I am making a big enough change to the extension to warrant a new version number I duplicate the CharCounter folder and add _{new version number} to it? Thereby having several CharCounter folders each with a different version number appending to them.

or should I set it up in

~Sites/Chrome_extensions/{my employers name}/CharCounter/

and never duplicate the CharCounter folder but just make a new commit every time I make a new version?

How do you tackle version control? Does using git do away with having to keep multiple versions (current and legacy) of your code in folders called folder_version_X.Y.Z or is that still a good idea?

share|improve this question
up vote 2 down vote accepted

The best solution would indeed be tags, perhaps something that might get what you want is to (partially) implement a workflow as illustrated here.

To make it easier to work with such a workflow a git extension has also been made which can be found here

This would allow you to:

  • Switch back to a previous version if that needs some bug fixing
  • Work on multiple new features at the same time (If this ever occurs)
  • Make sure you always have a fully working branch
share|improve this answer

The later.

Create a new repository for every project. When you build a version you want to create a tag for it.

share|improve this answer
Thanks for the tag link, that's not something I've come across before. – MrMisterMan Sep 2 '11 at 23:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.