If I commit and push code from several devices to a single repo in Github, is it possible to determine which commit came from which device?
Devices can be on the same or different networks.
Does a git commit
metadata contain any unique identifier for the device, external identifiers such as ip address, or internally generated identifiers such as uuid?
I am asking this question out of curiosity, I don't intend to add such information to my commits.
CodePudding user response:
git cat-file -p $thatcommitid
prints the entirety of the commit metadata, that's literally all there is in it, zlib compressed with a type and length header showing that it's a commit and how long what you see printed is. So, no.
CodePudding user response:
I have made a small research and found a great answer that might help in determine-which-computer-a-git-commit-came-from
CodePudding user response:
contain any unique identifier for the device, external identifiers such as ip address, or internally generated identifiers such as uuid
No, but if you are looking to add this kind of information to your commits, you can either:
- use git notes
- use a pre-commit hook to automatically change the commit message to include the information you are after