Starting to use Maven on existing project without losing GIT history

I'm trying to integrate Maven into an existing project. Using IntelliJ IDEA, I've tried the following steps:

Right click on project -> Add Frameworks Support... -> Checking Maven and pressing OK

The above works great; except that it drastically alters (read: copy -> delete -> paste) the project structure. The change is fine - except that GIT believes that all files have been deleted and re-created (without history) in another folder.

How to integrate a project with Maven without losing the GIT history?


With git there is no difference between

copy -> delete -> paste

and simple

move

or even

git mv

which is equivalent to

copy -> delete -> paste
git add --all .

The problem might be in your diff tool. What are you using to view the diff?

Try

git add --all .

and commit and see what happens.

Also see

What's the purpose of git-mv?

链接地址: http://www.djcxy.com/p/57508.html

上一篇: 无头,脚本化Firefox / Webkit的Linux?

下一篇: 开始在现有项目中使用Maven而不会丢失GIT历史记录