5 ms·
Git Blame-Someone-Else
- nasretdinov 3y agoThe only downside of this script is that it changes commit hashes, so you actually can only blame someone else if you force-push or just showing blame on your computer. It would be nice if it could be done without changing the commit SHAs.
- ditsuke 3y agoThat could've been possible if Git didn't use commit metadata hashes, (un)fortunately it's smart enough to do that.
- proto_lambda 3y agoThe whole point of commit hashes is that you can't do that, so no, being able to change history undetected would not be nice at all.
- MrGagi 3y agoBut funny enough is that there is a commit where it pretends to be Linus https://github.com/jayphelps/git-blame-someone-else/commit/e5cfe4bb2190a2ae406d5f0b8f49c32ac0f01cd7 https://github.com/jayphelps/git-blame-someone-else/commit/e...
- aae42 3y agoThis is why I sign my commits... It's also easy these days to do it with an SSH key
- aflag 3y agoInitially I thought it would show all changes to a file that were made by someone other than the person running the command. So, for instance, if there's a line I changed recently, it would go down history further to find the original author.
- Tyr42 3y agoThat's what I was looking for too. Would be useful.
- saagarjha 3y agoIt's actually a pretty convenient script to use locally when doing repository manipulation, for example when you're cherry-picking other people's commit via patch and want to attribute it to them.
- ahrzb 3y agoBut changing commit author is quite easy with git, just do: ‘git commit -a —author “<name+email>”’