Releases: Incognito/git-exfiltrator
Releases · Incognito/git-exfiltrator
0.2.0: Merge pull request #7 from Incognito/0.2
Usage: git-exfiltrate [-h] [-b] <against> <new-branch> <pathspec> (<base>)
<against> The branch you will merge changes into
<new-branch> The branch you want to create
<pathspec> the path you wish to split ("some/path/*")
<base> (optional) The tool will attempt to auto-detect the common ancestor
between your branch and the against target. If your branch histories
are complicated you can manually provide the original ancestor commit.
Break a big feature branch into a smaller specific branch with the changes from
one specific folder. Also, preserve your commit history.
0.1.0 (filter-branch)
Beta release of git-exfiltrator
This version attempts to walk through the commit history and re-write individual commits for each section of code to just include the target folder.
git filter-branch --force --prune-empty --index-filter \
"git ls-files | grep -Ev $pathspec | xargs git rm --cached" "$(git merge-base "$destinationRef" "$originRef")..HEAD"
There is a defect with this which is more obvious in repos with lots of mixed commit activity and conflict resolution merges: some artifacts in the exclusion zone are brought over to the split branch. I want to try a new approach moving forward in 0.2.0.