I am interested in knowing which one of the two users made the file changes when github lists both. The git record contains only UserA however.
commit. A commit, or "revision", is an individual change to a file (or set of files). When you make a commit to save your work, Git creates a unique ID (a.k.a. the "SHA" or "hash") that allows you to keep record of the specific changes committed along with who made them and when.
Unrecognized author (with email address) If you see this message with an email address, the address you used to author the commit is not connected to your account on GitHub. To link your commits, add the email address to your GitHub email settings.
To search commits in a specific repository, use the repo qualifier. gibberish user:defunkt matches commit messages with the word "gibberish" in repositories owned by @defunkt. test org:github matches commit messages with the word "test" in repositories owned by @github.
Commit hashesThe long string following the word commit is called the commit hash. It's unique identifier generated by Git. Every commit has one, and I'll show you what they're used for shortly. Note: The “commit hash” is sometimes called a Git commit “reference” or “SHA”.
UserA is the one who actually made the changes. UserB is the one who committed those changes to this branch. i.e if UserA commits his changes to branch1, UserB comes, commits a couple changes to branch2, rebases branch1 with branch2. Now, topmost commits in branch1 will show that UserA has committed these changes with UserB.
Edit: This mainly happens during rebasing and cherry-picking, since authors and committers can be different in these processes.
@venkatKA's answer is accurate and descriptive but I thought I'd add a few details.
git cat-file -p HEAD
can be used to print out information about the commit
tree d85ed3c3a055c95445898a5119ea0a532459fdsf parent 0b6ed951b2c04b4134c91ffa053b4330edfdffc1 author AuthA <[email protected]> 1487356245 +0000 committer AutbB <[email protected]> 1487356245 +0000
If you want to fix historic committers (for example if you are changing your identity) then you can use:
git filter-branch -f --tree-filter "GIT_COMMITTER_NAME='New Author'; GIT_COMMITTER_EMAIL='New Author'"
The standard comments about rebases breaking history and why revisionism is a bad idea apply.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With