programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
learnbyexample to ProgrammingEnglish · 2 years ago

In a git repository, where do your files live?

jvns.ca

external-link
message-square
5
link
fedilink
  • cross-posted to:
  • git
43
external-link

In a git repository, where do your files live?

jvns.ca

learnbyexample to ProgrammingEnglish · 2 years ago
message-square
5
link
fedilink
  • cross-posted to:
  • git
In a git repository, where do your files live?
alert-triangle
You must log in or register to comment.
  • Kissaki@feddit.de
    link
    fedilink
    English
    arrow-up
    22
    ·
    edit-2
    2 years ago

    In the object store. Object store is then packed into packs.

    https://git-scm.com/book/en/v2/Git-Internals-Git-Objects

    I’d link a good github intro article too but I don’t have it at hand.

    /edit: IIRC not the one I thought of but

    • https://github.blog/2022-08-29-gits-database-internals-i-packed-object-store/
    • ellotheth@artemis.camp
      link
      fedilink
      arrow-up
      6
      ·
      2 years ago

      The post you have commented on is a link to a blog post that answers the question.

      • Kissaki@feddit.de
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 years ago

        Oops, I indeed hadn’t noticed.

      • Kissaki@feddit.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years ago

        deleted by creator

      • Lmaydev
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        This is why I really dislike rhetorical questions as titles haha

  • notabot@lemm.ee
    link
    fedilink
    arrow-up
    9
    ·
    2 years ago

    There are multiple copies of your files; the obvious one is your ‘working copy’, which is just the files on your machine that you work on. The second copy is in your local object store (in the .git directory). Git stores the committed data and it’s metadata there. Then there’s the remote copy on your git server if you push your commits to one.

    Git uses the difference between the data in your ‘working copy’ and your object store to work out what you’ve changed and so needs commiting.

Programming

programming

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 237 users / day
  • 1.34K users / week
  • 3.01K users / month
  • 7.2K users / 6 months
  • 2.72K local subscribers
  • 20.2K subscribers
  • 2.19K Posts
  • 35.2K Comments
  • Modlog
  • mods:
  • snowe
  • Ategon
  • MaungaHikoi@lemmy.nz
  • UlrikHD
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org