Skip to content

Notes on Modifying History

Brandon Holt edited this page Oct 29, 2013 · 3 revisions
git filter-branch -f --prune-empty --tag-name-filter cat --index-filter 'git rm --cached --ignore-unmatch doc/* docs/* greenery/* convey/* exper_runner/* infiniband/* jumpthreads/* liberty-queues/* mark_scratch/* metrics/* numautil/* prototyping/* queues/* task_migration/* uts/* work_stealing/* global_array_gasnet/* global_memory/* globalmem/* bench/*' -- --all
git filter-branch -f --prune-empty --tag-name-filter cat --index-filter 'git rm --cached --ignore-unmatch applications/ConnectComp/* applications/Gups/* applications/GraphCT/* applications/ZIPs/* applications/scratch/* applications/CrayXMTgups/* applications/DIMACS-ch9/* applications/SSCA2* applications/graph500-graph500/* applications/limits* applications/pChase* applications/gabSer/* applications/launch_fsworkers.sh' -- --all
git filter-branch -f --prune-empty --tag-name-filter cat --index-filter 'git rm --cached --ignore-unmatch tools/gflags/* tools/MultiCacheSim/* tools/VampirTrace-5.12.2/* tools/likwid-2.0/* tools/pin* tools/stl-debug* tools/ga-5-0-2/* tools/gperftools-2.0/*' -- --all > /dev/null
git filter-branch -f --prune-empty --tag-name-filter cat --index-filter 'git rm --cached --ignore-unmatch qthread-1.4/*' -- --all > /dev/null
git gc --prune=now

# delete tags
git tag | xargs -n1 git tag --delete

# delete all remote branches
git branch -r | grep -v "HEAD" | ruby -ne 'puts $_[/origin\/(.+)/,1]' | xargs -n1 git push --delete origin
# re-push modified local branches
git push -u origin <branch>

Branches

  • master (duh)
  • cmake-port
  • bholt-app-fft
  • simon_connected_components

Doc branches

  • asplos14-de-anonymized
  • sosp-bofa
  • prefetch13

git filter-branch -f --prune-empty --tag-name-filter cat --index-filter 'git rm --cached --ignore-unmatch doc/* docs/* greenery/* convey/* exper_runner/* infiniband/* jumpthreads/* liberty-queues/* mark_scratch/* metrics/* numautil/* prototyping/* queues/* task_migration/* uts/* work_stealing/* global_array_gasnet/* global_memory/* globalmem/* bench/* applications/ConnectComp/* applications/Gups/* applications/GraphCT/* applications/ZIPs/* applications/scratch/* applications/CrayXMTgups/* applications/DIMACS-ch9/* applications/SSCA2* applications/graph500-graph500/* applications/limits* applications/pChase* applications/gabSer/* applications/launch_fsworkers.sh tools/gflags/* tools/MultiCacheSim/* tools/VampirTrace-5.12.2/* tools/likwid-2.0/* tools/pin* tools/stl-debug* tools/ga-5-0-2/* tools/gperftools-2.0/* qthread-1.4/*' -- --all > /dev/null