Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does UserA committed with UserB 13 days ago on github mean?

Tags:

git

github

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.

like image 563
Michael Avatar asked May 16 '16 00:05

Michael


People also ask

What does Committed mean in GitHub?

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.

Why is my commit associated with the wrong person?

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.

How do I see commit messages in GitHub?

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.

What is commit hash in git?

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”.


2 Answers

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.

like image 152
venkatKA Avatar answered Sep 23 '22 18:09

venkatKA


@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.

like image 28
Att Righ Avatar answered Sep 24 '22 18:09

Att Righ