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

Re: Repo with only one file

From
SWshawn wilson <ag4ve.us@gmail.com>
Date
Aug 9, 2013, 10:03 UTC
Message-ID
<CAH_OBifYFyVVo_OEfniWJE=0peX+UPLkRznqyQzvO4gGGLu_tQ@mail.gmail.com>
In-Reply-To
<52049121.2080604@viscovery.net>
On Fri, Aug 9, 2013 at 2:50 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 31 quoted lines
> Am 8/9/2013 8:33, schrieb shawn wilson:
>> On Fri, Aug 9, 2013 at 2:25 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
>>> Am 8/8/2013 23:11, schrieb Phil Hord:
>>>> On Wed, Aug 7, 2013 at 5:07 PM, shawn wilson <ag4ve.us@gmail.com> wrote:
>>>>> 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
>>>>>>>
>>
>>> I'm not sure. On second thought, my suggested command is not sufficient.
>>> It does remove the empty commits, but it does not remove the other files.
>>> So, Shawn's original filter-branch invocations are still needed.
>>>
>>
>> Yeah, I have tried this and haven't gotten any closer. I can either
>> remove all of the history or that one commit that has nothing to do
>> with my file is there. This is also reproducable in a new repo.
>>
>> Is this a bug with filter-branch or git? This doesn't seem like a
>> feature (or how things should act).
>
> Let's check: After running your command above to remove other files, does
> the command
>
>    git filter-branch -f HEAD webban.pl
>

Ahha, no but: git filter-branch -f HEAD -- webban.pl did

Thanks.
The question still stands though - why is that unassociated commit left there?
Previous: Johannes SixtNext: Johannes Sixt
Message 8 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.