Crazyjavahacking
Crazyjavahacking

Reputation: 9697

Modify paths in git history from src/ to src/main/java

I basically need to modify paths in whole git history from src/... into src/main/java/... fixing the directory structure to Maven rules.

I am trying to find a working sample of git filter-branch --tree-filter that would do that.

Any ideas?

Upvotes: 0

Views: 53

Answers (1)

Vampire
Vampire

Reputation: 38649

git filter-branch --tree-filter 'mv src src_old && mkdir -p src/main && mv src_old src/main/java' -- --all

Upvotes: 3

Related Questions