It sounds like you're looking to concatenate a bunch of files,
namely, all files checked into git.

My $0.02:
The gist of which you could achieve using
  git ls-files -z | xargs -0 cat

You can filter that list
  git ls-files -z | grep --null -v .gitignore | xargs -0 cat

The problem is it's going to be sorted alphanumerically (I believe).

What I like to do in these situations is create a directory
  mkdir ordered
then symlink the files I want in an order respected by most tools
  ln  -s file.txt ordered/01-file.txt
  ln -s afile.txt ordered/02-afile.txt
etc.

You can even check these symlinks into version-control but you may run into 
situations where git breaks them.

On Wednesday, December 22, 2021 at 5:43:17 PM UTC+1 David McMurrey wrote:

> Okay,  let's say each of my committed files is a chapter in a book, or 
> each committed file is some piece of Perl code I'm writing. I want to see 
> the actual HTML page or Perl code ready to use. 
>
> I think my answer is that the actual files in the working directory are 
> the ones I want to keep and use. I just pull them together say in HTML or 
> Perl and away we go! I think I  assumed that, once committed, you threw 
> away those files in the working directory. Wrong, right?
>
> I really appreciate your help, Philip and Matt. It's hard to get away from 
> the files-in-a-directory perspective! My fledgling tech-writing students at 
> Austin Community College will appreciate this help too.
>
> -- David
> www.prismnet.com/~hcexres/
>
> On Wednesday, December 22, 2021 at 9:38:18 AM UTC-6 [email protected] 
> wrote:
>
>> An interesting question, but maybe not quite as clear as to what is 
>> desired. 
>>
>>
>>    - Are you just looking for a print out of the files in the final 
>>    commit - the finished project?
>>    - Are you looking for a listing of all the commits (headline/subject) 
>>    from the very beginning to the final commit?
>>    - Are you looking for the commit messages as well that explain every 
>>    step?
>>    - With each of the diff's for each explained commits?
>>
>> Some of your answer will depend on how you managed the repos workflow, 
>> such as having strong summary merge commits, or making sure that all the 
>> temporary 'wip' commits had been rebased away. You may have had at least 
>> some good tags that summarise major releases (relatively easy to list..).
>>
>> If it's just some formal summary document you need to tick a box for 
>> quality control then it (the readable summary) doesn't need doing well ;-) 
>>
>> The main part will be to bundle whole repo and save that away as a 
>> 'compressed attachment' which will allow the complete repo to be recreated. 
>> You may need to prune the remote refs and temporary branches before using 
>> --all to ensure you have the minimum of extraneous crud in the bundle 
>> (--all gets all the crud refs and everything..)
>>
>>
>> On Wednesday, December 22, 2021 at 3:05:25 PM UTC David McMurrey wrote:
>>
>>> I have  looked and looked to see how we can print out or display the 
>>> contents of a local repo. I thought git-cat was the answer then git print 
>>> origin. 
>>>
>>> When we have finished a git project, we need to display it as a regular 
>>> document. How is that done?
>>>
>>> -- David
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/494b81fc-9820-41fb-a0e2-872595031b44n%40googlegroups.com.

Reply via email to