SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
learnbyexample@programming.dev to Programming@programming.devEnglish · 2 years ago

In a git repository, where do your files live?

jvns.ca

external-link
message-square
5
fedilink
  • cross-posted to:
  • git@programming.dev
  • hackernews@lemmy.smeargle.fans
  • hackernews@derp.foo
43
external-link

In a git repository, where do your files live?

jvns.ca

learnbyexample@programming.dev to Programming@programming.devEnglish · 2 years ago
message-square
5
fedilink
  • cross-posted to:
  • git@programming.dev
  • hackernews@lemmy.smeargle.fans
  • hackernews@derp.foo
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@programming.dev
        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.dev

programming@programming.dev

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: !programming@programming.dev

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 !webdev@programming.dev



Visibility: Public
globe

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

  • 301 users / day
  • 1.33K users / week
  • 2.99K users / month
  • 7.17K users / 6 months
  • 311 local subscribers
  • 20.2K subscribers
  • 2.22K Posts
  • 34.8K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • MaungaHikoi@lemmy.nz
  • UlrikHD@programming.dev
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org