Show contents of all git objects in a git repo

find .git/objects/ -type f \| sed 's/\.git\/objects\/\///' | sed 's/\///g' | xargs -n1 -I% echo echo "%" \$\(git cat-file -p "%"\) \0 | xargs -n1 -0 sh -c
This script finds all git objects and `git cat-file`'s their content. This is really just a helper function to play around with the internals of git repositories. See https://git-scm.com/book/en/v2/Git-Internals-Git-Objects of more info.
Sample Output
$ mkdir test1; cd test1; git init
$ echo hello | git hash-object --stdin -w
ce013625030ba8dba906f756967f9e9ca394464a

$ cd ..; git clone test1 test2; cd test2

# now we run the command and notice
# the objects have been cloned
$ find .git/objects/ -type f \| sed 's/\.git\/objects\/\///' | sed 's/\///g' | xargs -n1 -I% echo echo "%" \$\(git cat-file -p "%"\) \0 | xargs -n1 -0 sh -c
4b825dc642cb6eb9a060e54bf8d69288fbee4904
ce013625030ba8dba906f756967f9e9ca394464a hello

1
By: wires
2020-11-15 09:24:58

What Others Think

Just use the pipe char in §sed§ under most circumstances instead of forward slash cuz you most likely need to escape more forward slashes than pipes. Plus it makes it much more readable and coherent.
rautamiekka · 44 weeks and 3 days ago
Do you sometimes have trouble writing an essay, or is it just that inspiration leaves you and you still need to write? I offer assignment help and you will see that this is the best service.
Otharei · 44 weeks and 2 days ago
I am the cofounder at CIPD writer Jordan and I am looking for a complete guide for coding, I want to learn how to develop a website in a professional way for my business and coming up ventures that I am planning. I need help, is there any expert? Or a teacher who can guide me thoroughly.
alicemorgan · 44 weeks ago
Really, this article is to a great degree one of the most flawlessly awesome ever [url=https://free-cell.co/]freecell[/url]
Selenagobella · 43 weeks and 5 days ago
it doesn't work. are there any other script? fencingsacramentoca.com
looneyhans · 43 weeks and 2 days ago
nice it really works! bathroomremodelcedarrapids.com
Killersmile · 42 weeks and 6 days ago
Thanks for sharing this information with us, I really admire such platforms that offer valuable information that is not available anywhere else. I am a blogger employed at guardians of the galaxy shop, offering writing services at affordable rates, if you want us to write your web content comment below.
alicemorgan · 42 weeks and 2 days ago
Your article has aroused a lot of positive attention. Thank you for sharing. renodrywallrepair.com
keywave110 · 41 weeks and 6 days ago
Osmanthus fragrans tea is a kind of precious flower tea made from exquisite tea billet and fresh osmanthus https://www.newblogclub.com
rong090 · 40 weeks and 6 days ago
Osmanthus fragrans tea is a kind of precious flower tea made from exquisite tea billet and fresh osmanthus new york escorts near me
rong090 · 40 weeks and 6 days ago
voip phone system service provider Osmanthus fragrans tea is a kind of precious flower tea made from exquisite tea billet and fresh osmanthus
rong090 · 40 weeks and 6 days ago
great bathroom remodeling contractors
looneyhans · 40 weeks and 2 days ago
awesome site thanks for posting fence company spartanburg
looneyhans · 40 weeks and 1 day ago
It’s also a place that, in a thousand years, might provide archaeologists with the most accurate clues as to what 21st century society was like. Inside an abandoned mine with an underground vault, a unique, Preet 8049 4WD Price
hrihant · 39 weeks and 1 day ago
I like robots. I know one company https://aduk.de/ . They working hardware and software.
val11 · 38 weeks and 6 days ago
Awesome blog by the way and thanks for sharing! septic tank pumping
idasanka · 38 weeks and 6 days ago
I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites blog site list and will be checking back soon. Please check out my site as well and let me know what you think. click" rel="nofollow">http://libjournal.uncg.edu/ap/user/viewPublicProfile/5446'>click this site
bojokey283 · 38 weeks and 3 days ago
Have you guys always wanted to be taught something before you did something and made a bunch of mistakes? Learning from your mistakes is good, but sometimes these mistakes can be fatal, so it is advisable to know about them and avoid them in advance. It is the same with bets, we need money and we cannot lose it! Because it's great that there are articles like this one https://www.mappingmegan.com/worldwide-sporting-events-post-pandemic/where people tell you how to avoid mistakes when betting
Laibor · 38 weeks and 3 days ago
Have you guys always wanted to be taught something before you did something and made a bunch of mistakes? Learning from your mistakes is good, but sometimes these mistakes can be fatal, so it is advisable to know about them and avoid them in advance. It is the same with bets, we need money and we cannot lose it! Because it's great that there are articles like this one https://www.mappingmegan.com/worldwide-sporting-events-post-pandemic/where people tell you how to avoid mistakes when betting
Laibor · 38 weeks and 3 days ago
Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us. read more http://libjournal.uncg.edu/ap/user/viewPublicProfile/5446
xoheko1229 · 38 weeks and 1 day ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. forex
bojokey283 · 37 weeks ago
home health care las vegas I was just wondering... I'm an android user now but I want to change it to that. How can I get started?
yeoyeo · 36 weeks and 6 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. covid isla mujeres
bojokey283 · 36 weeks and 6 days ago
Nursing coursework writing service seekers have been on the rise lately since most learners need Legitimate Nursing Writing Services, legitimate nursing writing services and professional nursing essay writing help services.
joandavis · 36 weeks and 3 days ago
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. online marketing
bojokey283 · 36 weeks and 1 day ago
Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. house clearance bridgend
bojokey283 · 36 weeks ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. taco catering
bojokey283 · 35 weeks and 6 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. buy targeted traffic
bojokey283 · 35 weeks and 4 days ago
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me. Turmeric Essential Oil
bojokey283 · 35 weeks and 2 days ago
This works really well for us, thank you! Thanks for the information, keep sharing this type of info Krogerfeedback
Greenfelder · 34 weeks and 2 days ago
Thank you people
sammm · 33 weeks and 6 days ago
You have a real ability for writing unique content. I like how you think and the way you represent your views in this article. I agree with your way of thinking. Thank you for sharing. tulum mexico weather
bojokey283 · 33 weeks and 2 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. schluesseldienst köln
bojokey283 · 33 weeks and 1 day ago
Anybody here tried to sell osrs gold before?
charlesmax23 · 31 weeks and 6 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. cancun
bojokey283 · 31 weeks and 4 days ago
I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. okos ügyvéd Debrecen
bojokey283 · 30 weeks and 6 days ago
Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done. cenotes en tulum mexico
xoheko1229 · 30 weeks and 3 days ago
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me. otomatisasi rumah
bojokey283 · 30 weeks and 1 day ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. hosszútávú pályázatírás Debrecen
bojokey283 · 29 weeks and 2 days ago
I read a article under the same title some time ago, but this articles quality is much, much better. How you do this.. best beach in cozumel mexico
xoheko1229 · 29 weeks ago
Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information. scuba diving cozumel mexico
xoheko1229 · 28 weeks and 6 days ago
Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.. must do in tulum
xoheko1229 · 28 weeks and 3 days ago
This article is an appealing wealth of informative data that is interesting and well-written. I commend your hard work on this and thank you for this information. You’ve got what it takes to get attention. best places to stay in cancun
xoheko1229 · 28 weeks and 1 day ago
This article is an appealing wealth of informative data that is interesting and well-written. I commend your hard work on this and thank you for this information. You’ve got what it takes to get attention. best places to stay in cancun
xoheko1229 · 28 weeks and 1 day ago
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. best restaurant cancun
xoheko1229 · 28 weeks and 1 day ago
nice post, keep up with this interesting work. It really is good to know that this topic is being covered also on this web site so cheers for taking time to discuss this! restaurant in playa del carmen
xoheko1229 · 28 weeks ago
This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine. map of isla mujeres
xoheko1229 · 27 weeks and 6 days ago
I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well. best resort isla mujeres
xoheko1229 · 27 weeks and 5 days ago
Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing isla contoy tour
xoheko1229 · 27 weeks and 4 days ago
Great post I would like to thank you for the efforts you have made in writing this interesting and knowledgeable article. treatnheal
xoheko1229 · 26 weeks and 2 days ago
I don't care what other people think. I am old enough to take responsibility for my actions and decisions. I will buy an argumentative essay and I understand the importance of this paper and responsibility of the future results.
KathyB · 25 weeks and 6 days ago
I found that site very usefull and this survey is very cirious, I ' ve never seen a blog that demand a survey for this actions, very curious... Inteligentny dom
xoheko1229 · 25 weeks and 3 days ago
Whoa! I just can't believe I found this site private investigator tallahassee
aegyjingoo · 24 weeks and 5 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. unique bathroom vanity
bojokey283 · 24 weeks and 3 days ago
Please continue this great work and I look forward to more of your awesome blog posts. covid cancun
bojokey283 · 23 weeks and 2 days ago
This is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works. Hualien restaurants
xoheko1229 · 23 weeks ago
I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post. Coronavirus Taiwan
bojokey283 · 22 weeks and 6 days ago
Between your working directory and your registry, the GIT index serves as a staging area. You will use the index to assemble a group of modifications that you want to commit all at once. When you make a commit, you're committing what's in the index right now, not what's in the working directory. British Dissertation Writing
BrianMckay · 21 weeks and 6 days ago
Hello There. I found your blog using MSN. This is a very well-written article. I’ll be sure to bookmark it and return to learn more of your helpful information. Thank you for the post. I’ll certainly comeback best bookkeeping
Devid · 21 weeks and 1 day ago
not into it www.marriagecounselingcedarrapids.com
geebranz · 19 weeks ago
This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work cozumel diving
xoheko1229 · 17 weeks ago
Are you too busy to work on an assignment? or finding assignment services to complete the project, but you dont understand the topic? Sometimes youre just too tired from all the classes and exams, so an additional assignment was the straw that broke the camels back. If you encounter any obstacle with Do my assignment there is only one reasonable solution: hiring an assignment writing services.The fact that you can get professional My Assignment Help uk with your assignments goes to your advantage: you can always get the projects you need without missing the deadlines your professors imposed. No one will ever know that you relied on an expert writer, so you wont put your grade and academic record at risk. On the contrary; youll get a high grade and youll improve your own skills and knowledge in the topic youre supposed to work on.
david230 · 16 weeks and 3 days ago
I gotta favorite this website it seems very helpful . film equipment cape town
xoheko1229 · 16 weeks ago
I am having some problem with the git repo, can anyone help me on how to fix it? greensboro general contractor
ogilview82 · 15 weeks and 2 days ago
excellent points altogether, you simply received brand new reader. What could you recommend about your post that you simply made some days ago? Any sure? http://besttemplatetuning.com/2021/06/30/baccarat-casino-match-learning-the-fundamentals/">Baccarat Casino Match
robinjack · 11 weeks and 4 days ago
Seems like an impressive code thanks for sharing this site is great! drywall sarnia
OrionsFive · 6 weeks and 5 days ago
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. Indeed
xoheko1229 · 5 weeks and 3 days ago
I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well. tulum resorts
xoheko1229 · 5 weeks and 2 days ago
Thanks for spending some time to line all of this out for people. This kind of posting has been incredibly helpful if you ask me. http://www.strandusa.com/">temperature monitoring
robinjack · 3 weeks and 2 days ago
disaster movie is hilarious, i laugh for hours just watching that movie;; discount office furniture northern virginia
robinjack · 1 week and 4 days ago
If you have a limited understanding, short-sighted, superficial understanding of everything, you're clearly eliminating yourself in modern society. Try the great feeling with us dissertation writing Service help uk
Conyjohn09 · 3 hours ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: