GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GIT-OBLITERATE(1) Git Extras GIT-OBLITERATE(1)

git-obliterate - rewrite past commits to remove some files

git obliterate <files...> [-- <rev-list options...>]

Completely remove some files from the repository, including past commits and tags. WARNING! This command will rewrite the history similar to git rebase(though it affects more). The rewritten history will have different object names for all the objects and will not converge with the original branch. So avoid using it on commits that you shared. And it will mess up stash, so don´t have stash when you run git obliterate.

You can pass rev-list options to indicate the range of commits affected. Those options need to be separated with ´--´ before them. Run git help rev-list to see the acceptable options.

Remove .secret from the repository:
$ git obliterate .secret
    

Remove .secret from commits between origin and feature:

$ git obliterate .secret -- feature ^origin
    

Remove .secret from commit abcdefg to commit 1234567

$ git obliterate .secret -- abcdefg..1234567
    

Written by <brianloveswords@gmail.com>

<https://github.com/tj/git-extras/issues>

<https://github.com/tj/git-extras>
October 2017

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.