1

I have read the relevant git documentation:

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

I have not found any information about the .git/objects/refs/heads/info directory; though I understand that .git/objects/refs/heads/pack is for pack-files.

However, it is permitted to create branches such as:

$ git branch info/my_branch
$ git branch pack/my_branch

which will then be located at .git/objects/refs/heads/info/my_branch and .git/objects/refs/heads/info/my_branch.

I am writing a Python script in order to parse my Git objects in a certain way, with one step being to look for all the branch references. I realize now I need to also look into info and pack and sort out conflicts.

What is the info directory typically used for otherwise?

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
  • 1
    Do you really need to look inside the `.git` directory to discover branches, or could you just use `git for-each-ref` instead? That way you don't need to worry about the details of how `git` stores things. – larsks Mar 08 '23 at 00:55
  • I am manually doing it using Python only. I do not want to run any subcommands. I'm more asking about the purpose of `info/`, not so much as to how I could make my implementation different ( it is an exercise for me ). – user9329423 Mar 08 '23 at 03:05
  • I don’t have `.git/objects/refs/heads/info`. I also don’t have `.git/objects/refs/heads/pack`. – Guildenstern May 10 '23 at 05:34
  • [What is the `.git/objects/info` directory](https://stackoverflow.com/questions/45813786/what-is-the-git-objects-info-directory#45814033) – Guildenstern May 10 '23 at 05:35

1 Answers1

-1

The info() method prints information about the DataFrame. The information contains the number of columns, column labels, column data types, memory usage, range index, and the number of cells in each column (non-null values). Note: the info() method actually prints the info.

  • 1
    Are you referring to Panda’s `DataFrame.info()`? – Guildenstern May 10 '23 at 05:33
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 10 '23 at 05:33
  • The question was talking about Git's `.git/objects/refs/heads/info` directory. It wasn't talking about DataFrame's or any kind of `info()` method. – Gino Mempin May 13 '23 at 03:51
  • it litterally said he wanted the porpose of the info() method not so much as to how he could make his implementation different – Shimmie Shkedi May 14 '23 at 23:00