I can't see how to email a contributor on github after lengthy attempts, and google searches. Why does every beginners guide encourage us to immediately configure our user.email such that it is sent with every commit if its so difficult to view the contributors' email addresses on the commit chain in GitHub?
Asked
Active
Viewed 1.2k times
21
-
1Being able to easily get people's mail addresses from a web site doesn't sound like the best anti-spam technique out there, I'd guess. You can get them through a lot of git commands, though: blame, log, for example. – eftshift0 Mar 22 '17 at 16:38
-
Yeah I guess that makes sense since most repos are public. I was imagining most projects would be a personal collaboration between friends or members of a company but obviously public is public. – sphere Mar 22 '17 at 16:41
3 Answers
18
You can use
git log
or
git show [commit number]
Output:
commit 5f3be67saki52cv80l0e4f55c05ec897de3sdgt67
Author: someone <someone@mail.com>
Date: Wed Mar 23 17:10:48 2017 +0100
Commit message
Lahiru
- 1,050
- 10
- 17
16
Add .patch to the end of the commit url to open patch view.
https://github.com/torvalds/test-tlb/commit/4210d1cfc58f2d8a3da0730389ee63d68c6fe914.patch
https://www.thereach.io/blog/articles/how-to-find-github-user-email-addresses
Alex78191
- 1,635
- 1
- 14
- 23
4
Here is some command to get author and email of the last commit:
git show --format="%aN <%aE>" COMMIT_ID
Here the version for older git versions (<= 1.6)
git log -1 --pretty=format:"%an <%ae>"
rakwaht
- 3,220
- 1
- 25
- 42