Private Private - 21 days ago 6
Git Question

Is it possible to use git to find out what computer a file was made on?

Is it possible to use git to find out what computer a file was made on? If you have a code repo, is it possible to examine the files and see on what computer they were made and by what username? For instance, were they created on mac or linux?

Answer

No, I do not believe that is possible. A Git repo is just a group of commits. From a great DZone article (Git Behind the Curtain: What Happens When You Commit, Branch, and Merge):

Each commit contains three pieces of information: metadata about the commit (who made it, when it happened, and the message), a list of parent commits (which is empty for the first commit but has at least one entry for every other commit), and a reference to the “tree” object holding the root of the project directory.

Even at that, the "who" part comes from your Git config -- user.name & user.email.