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

Re: Repo with only one file

From
Phil Hord <phil.hord@gmail.com>
Date
Aug 8, 2013, 21:11 UTC
Message-ID
<CABURp0o_07HdB2o0knPABtAiiuHQ6-fYgemvdCYOsdSghO7v1w@mail.gmail.com>
In-Reply-To
<CAH_OBicysTTu9YdHsHz0H6x3umU5va68J3nT1qHA9-CJY9+E=A@mail.gmail.com>
On Wed, Aug 7, 2013 at 5:07 PM, shawn wilson <ag4ve.us@gmail.com> wrote:
Show 24 quoted lines
> On Wed, Aug 7, 2013 at 6:43 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
>> Am 8/7/2013 8:24, schrieb shawn wilson:> ... create a repo for one of
>>> these scripts and I'd like to keep the commit history.
>>>
>>> Ok, so:
>>> % find -type f ! -iname "webban.pl" | while read f; do git
>>> filter-branch -f --index-filter "git rm --cached --ignore-unmatch $f"
>>> HEAD ; done
>>>
>>> Which basically did it. But, I've got this one commit that seems to be
>>> orphaned - it doesn't change any files.
>>
>> Try this:
>>
>>   git filter-branch HEAD -- webban.pl
>>
>
>  % git filter-branch HEAD -- webban.pl
> Cannot create a new backup.
> A previous backup already exists in refs/original/
> Force overwriting the backup with -f
>  % git filter-branch -f HEAD -- webban.pl
> Rewrite 1e04b18c256c996312f167be808733bcc755f1e3 (9/9)
> WARNING: Ref 'refs/heads/master' is unchanged

I think you can ignore the warning. Maybe you want to create a new branch which only has this file in it now.

   $ git checkout -b webban
Phil
Previous: shawn wilsonNext: Johannes Sixt
Message 4 of 11 in “Repo with only one file”
  1. shawn wilsonAug 7, 2013
  2. Johannes SixtAug 7, 2013
  3. shawn wilsonAug 7, 2013
  4. Phil HordAug 8, 2013
  5. Johannes SixtAug 9, 2013
  6. shawn wilsonAug 9, 2013
  7. Johannes SixtAug 9, 2013
  8. shawn wilsonAug 9, 2013
  9. Johannes SixtAug 9, 2013
  10. shawn wilsonAug 9, 2013
  11. Phil HordAug 9, 2013

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.