From: Baz <brian.ewins@gmail.com>
To: "Caleb Cushing" <xenoterracide@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: need help stripping a repo to one file
Date: Mon, 20 Oct 2008 12:53:04 +0100 [thread overview]
Message-ID: <2faad3050810200453o231d9702i6856657b925dd332@mail.gmail.com> (raw)
In-Reply-To: <81bfc67a0810190327i7842d346g4c20f5816e8a9eda@mail.gmail.com>
2008/10/19 Caleb Cushing <xenoterracide@gmail.com>:
> here's what I've done so far (note: this is a public repo if anyone
> wants to take a look)
>
> git clone git@github.com:xenoterracide/dot_usr.git sql_iabbr
> cd sql_iabbr/
> git checkout db3c5ffb180f10dde8e539a81a6644760e098dcd
> git branch -D master
> git checkout -b master
> git filter-branch --subdirectory-filter vim/ftplugin/ -- --all
>
>
> that leaves me with this
> html sgml sh tex vim xhtml xml sql_iabbr.vim xml.vim
>
> all I want left is sql_iabbr.vim and it's history
So you just want the history for a single file?
git log -p --reverse --pretty=email -- sql_iabbr.vim
That outputs a patch history for sql_iabbr.vim in mbox format, you can
import that into an empty repo with git-am.
(I had a look at the project, the history is simple with no merges
etc, so nothing like --first-parent is needed)
Cheers,
Baz
>
> I've used stuff like
> git filter-branch --tree-filter 'rm -rf xml.vim' HEAD
>
> to remove the files... but I notice that leaves the logs.
>
> I'm thinking I could do that and then remove those commits but I
> haven't figured out how to remove the commits, and even then I'm not
> sure the repo would be in the state I want.
>
> can anyone help me get to where I want to be? also is there an easier
> way to do what I've done so far?
> --
> Caleb Cushing
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2008-10-20 11:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-19 10:27 need help stripping a repo to one file Caleb Cushing
2008-10-20 11:53 ` Baz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2faad3050810200453o231d9702i6856657b925dd332@mail.gmail.com \
--to=brian.ewins@gmail.com \
--cc=git@vger.kernel.org \
--cc=xenoterracide@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).