@rem bat file for Sourcetree's gitbush. @rem ".\\_reBuildGit.bat" command on sourcetree git bush. @rem ========================================================= SET TEMP_DIR="_temporary" SET REBASE_TARGET=ad0fefd @rem ========================================================= @rem move new Files to git ignore directory mkdir %TEMP_DIR% move "_tool" %TEMP_DIR%/"_tool" move "animGif" %TEMP_DIR%/"animGif" @rem ========================================================= @rem commit change(deleting files on git new commit) git add -u git commit -m "--" @rem ========================================================= @rem rebase first commit ID git rebase -i %REBASE_TARGET% @rem ========================================================= @rem cleaning files(in git) git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch XXX/ *.gif" --prune-empty -- --all git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch XXX/ *.png" --prune-empty -- --all git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch XXX/ *.PNG" --prune-empty -- --all git reflog expire --expire=now --all git gc --aggressive --prune=now @rem ========================================================= @rem restore script files. @rem ========================================================= move %TEMP_DIR%/"_tool" "_tool" move %TEMP_DIR%/"animGif" "animGif" move %TEMP_DIR%/"src" "src" @rem ========================================================= @rem apply new change and commit to git git add -A git add -u git commit -m "--" @rem ========================================================= @rem start cmd with other process. and create reapck index @rem ========================================================= @rem start Reapack_Create.bat @rem ========================================================= @rem git push -f