开发者

merging 3 source versioned trees into 1

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 on git add -A)
  • commit and tag
  • repeat (*)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜