git/list[1] front-page[2] threads[3] people[4] search[5] about
 

need help stripping a repo to one file

From
Caleb Cushing <xenoterracide@gmail.com>
Date
Oct 19, 2008, 10:27 UTC
Message-ID
<81bfc67a0810190327i7842d346g4c20f5816e8a9eda@mail.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

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
Next: Baz
Message 1 of 2 in “need help stripping a repo to one file”
  1. Caleb CushingOct 19, 2008
  2. BazOct 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.