1

I have a very strong understanding of git. I just can't find out how to make a patch, get the object from a SHA, or find a way to credit this user for the commit shown here: https://github.com/sparkfun/DeadOn_RTC/commit/c39db0e3e531938815ec6113d6a0f4283dbe55c0

I've even tried using https://github.com/defunkt/hub

DeadOn_RTC$ hub cherry-pick https://github.com/sparkfun/DeadOn_RTC/commit/c39db0e3e531938815ec6113d6a0f4283dbe55c0
fatal: bad object c39db0e3e531938815ec6113d6a0f4283dbe55c0

DeadOn_RTC$ hub merge https://github.com/sparkfun/DeadOn_RTC/pull/1
Error: awickert's fork is not available anymore
Bruno Bronosky
  • 66,273
  • 12
  • 162
  • 149

1 Answers1

1

There are many ways I can think of to credit the user:

1) Take the actual commit, make a pull request from the issue using a tool like hub? https://stackoverflow.com/a/7841960/504685 ?

2) Create a merge commit of the other user's commit referencing the issue https://help.github.com/articles/closing-issues-via-commit-messages

3) Make a new commit (possibly via git cherry-pick or options on git commit) ensuring you set/keep the other user's details as the author


edit

Being on a laptop with a full git client and sourcetree now, I think I understand more. You are having trouble getting that commit since it's on an inactive pull request. These instructions should help: https://help.github.com/articles/checking-out-pull-requests-locally#modifying-an-inactive-pull-request-locally

Assuming that you have your repo as "origin" and the sparkfun repo as "sparkfun":

git fetch sparkfun pull/1/head:newbranch
git push -f origin newbranch:master

(This will get that commit into the master branch, and throw away your attempt at #1)

Community
  • 1
  • 1
Charlie
  • 7,181
  • 1
  • 35
  • 49
  • 1) When I do that I'm the author https://github.com/RichardBronosky/DeadOn_RTC/commit/bac73937705bb870a2a47a3d24666cae8b916b67 2) even hub get "fatal: bad object c39db0e3" from `hub cherry-pick https://github.com/sparkfun/DeadOn_RTC/commit/c39db0e3e531938815ec6113d6a0f4283dbe55c0` 3) That sounds obnoxiously manual and would only be a very last resort. – Bruno Bronosky Jul 22 '14 at 12:51
  • This really is an odd case. The user who created that issue and that commit does not have a fork I can clone. The URL for the commit points to the sparkfun user, not the user who filed the issue. If you clone the sparkfun repo and do a show on the commit you get "fatal: bad object..." – Bruno Bronosky Jul 22 '14 at 12:53
  • With 1 your attempt on 1, you made a new commit. Add the other user's repo as a second remote, and pull his commit locally and push it to your repo. – Charlie Jul 22 '14 at 12:58
  • Thanks for introducing me to the hub tool. That is, at least, one thing I'll take away from this. I updated the question to show the results. – Bruno Bronosky Jul 22 '14 at 13:06