Does Git store system information (like IP Address, system details etc…)


When I create a commit in git, does it store any information associated with the device (like IP Address, system details etc…) that I’m creating the commit from?

And if Git (the VCS) doesn’t store it, then do any of the Git service providers like GitHub, Bitbucket etc… store the system information?

For example, can anyone get the IP Address of the system that I’m using if I publish a git repository in GitHub and make it public?


No, Git does not store this information. Let’s check what it does in fact store:

$ git init
Initialized empty Git repository in /home/user/test/.git/
$ echo 'this is a file' > README
$ git add README
$ git commit -m 'Initial commit'
[master (root-commit) 8a4399d] Initial commit
 1 file changed, 1 insertion(+)
 create mode 100644 README
$ git cat-file -p 8a4399d
tree dbf49a0436d9fe83cc1528362959563c5b230ac4
author A Uthor <[email protected]> 1668115302 +0100
committer A Uthor <[email protected]> 1668115302 +0100

Initial commit

That’s all that’s stored in a Git commit. If it is not the root commit, it will have an additional "parent" line.

As for GitHub: you can use Git without it. It is only contacted when you run git push or git fetch. We can’t see their source code, so we don’t know. Probably, as part of webserver logs, at least IP address. Not sure what you mean with "system details", but probably not.

Answered By – knittl

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published