Live data from Hacker News

Git Blame-Someone-Else

github.com

1–10 of 13 posts

Re: Git Blame-Someone-Else

#2
The 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.

Re: Git Blame-Someone-Else

#3

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

That could've been possible if Git didn't use commit metadata hashes, (un)fortunately it's smart enough to do that.

Re: Git Blame-Someone-Else

#4

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

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

Re: Git Blame-Someone-Else

#7
Initially 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.

Re: Git Blame-Someone-Else

#8
post #7

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

That's what I was looking for too. Would be useful.

Re: Git Blame-Someone-Else

#9
It'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.

Re: Git Blame-Someone-Else

#10

It'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.

But changing commit author is quite easy with git, just do: ‘git commit -a —author “”’
Post reply on HN