This is probably an easy question...
I have 4 source versions of the same software in 4 different directories. I have just started using git for version control. To date, I have just been snapping a desperate copy rolling forward.
I want to merge all versions (1.0.0.1, 1.0.0.2, 1.0.0.3, 1.0.1.0) together so that I will have a reference history.
Opposed to just starting out w开发者_JAVA百科ith 1.0.1.0 as the initial version.
I want to get this sort of thing right form the start. Can someone outline the basic steps to accomplish this?
Thanks much, XO
You could:
cd 1.0.0.1
git init .
git add -A
git commit -m "1.0.0.1"
git tag 1.0.0.1 -m "1.0.0.1"
(using an unsigned annotated tag)
And then (not necessary the smartest way, but it should work)
- (*) remove everything except
.git
directory - copy the next version content in the current directory
git add -A
(see this SO question ongit add -A
)- commit and tag
- repeat (*)
精彩评论