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

Re: Suggestion: group files in GIT

From
Christian Couder <christian.couder@gmail.com>
Date
Jun 8, 2015, 19:48 UTC
Message-ID
<CAP8UFD24qiRzfPSkCppV-yPkoTVuwkJ+FDUGsv0Zrf66yOedOg@mail.gmail.com>
In-Reply-To
<CABEDGg8-B1QzkDas1dCcC7QivfOJuaGydki3OpON2T2WFVttFg@mail.gmail.com>
On Mon, Jun 8, 2015 at 10:50 AM, Konrád Lőrinczi <klorinczi@gmail.com> wrote:
Show 15 quoted lines
> I would like to group some files, so I can list group files together,
> list group changes together, filter by group for staging, also order
> by group.
> It seems, there is no such feature in GIT I would need, so I send it
> as suggestion.
>
> We can call this feature as "Group files" or "Label files" (labeling
> is used in Gmail, so this may be also a naming alternative).
>
>
> Example file list I would like to group together into [group1]:
> theme/header.php
> theme/footer.php
> theme/body.php
> lib/theme.php
Can't you use a shell variable like:
group1="theme/header.php theme/footer.php theme/body.php lib/theme.php"
?
Show 6 quoted lines
> They are in different directories, but mostly belongs together, so if
> I group them, then I can work easier with them.
>
>
> - I could select a file group for staging, so only the changes in the
> group would be added to stage.
git add $group1
Show 10 quoted lines
> Changed files in the group:
> [group1]/theme/header.php
> [group1]/lib/theme.php
>
>
> - I could list files filtered by a group. Files filtered by [group1]:
> [group1]/theme/header.php
> [group1]/theme/footer.php
> [group1]/theme/body.php
> [group1]/lib/theme.php
ls -l $group1
Show 6 quoted lines
> - I could order file list to list group files first, then directory files.
> [group1]/theme/header.php
> [group1]/theme/footer.php
> [group1]/theme/body.php
> [group1]/lib/theme.php
> other/files.php
I am not sure I see what you want to do with that.
Previous: Konrád Lőrinczi
Message 2 of 2 in “Suggestion: group files in GIT”
  1. Konrád LőrincziJun 8, 2015
  2. Christian CouderJun 8, 2015

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.