Gazler / githug

Git your game on!
MIT License
6.86k stars 1.03k forks source link

fix squash with some tips. #195

Closed legendtkl closed 8 years ago

legendtkl commented 8 years ago

First of all, githug is a great game.

For level squash, I got following message

kltao-mac:git_hug kltao$ git log
commit 3a3db5a1e53dd81f85925135d6bb75ba6f8f5ac6
Author: legendtkl <taokelu@gmail.com>
Date:   Thu Dec 31 09:11:20 2015 +0800

    Updating README

commit 1ed37b524cd77dc1dbf6068e981be346c577422e
Author: legendtkl <taokelu@gmail.com>
Date:   Thu Dec 31 09:11:20 2015 +0800

    Updating README

commit a9ed7bc80ff305c2749fcf6330a970dac1854a6d
Author: legendtkl <taokelu@gmail.com>
Date:   Thu Dec 31 09:11:20 2015 +0800

    Updating README

commit 8886d84a6ffecf30c3ec00e879f816bcfb66b597
Author: legendtkl <taokelu@gmail.com>
Date:   Thu Dec 31 09:11:20 2015 +0800

    Adding README

commit 83cb5d3da65c245a7912bf134e775fff25cc8550
Author: legendtkl <taokelu@gmail.com>
Date:   Thu Dec 31 09:11:20 2015 +0800

    Initial Commit

Actually, there are three kinds of commit message, so I squash the three "Updating README", that means, end with leaving three commits (Initial Commit, Adding README, Updating README). Then I got failed.

So my point is that the answer with 3 commits seems to be a more reasonable and understandable answer. What are you thinking of it ?

Gazler commented 8 years ago

Thanks for the pull request. I see your point. Perhaps it would be more clear instead to indicate the commits that need squashing?

Somthing like:

legendtkl commented 8 years ago

Yeah, you inspire me.

Give the detailed information about "squash" in your way is more comprehensible.

I have just update the file change. Thanks.

Gazler commented 8 years ago

@legendtkl Perfect. Could you just squash these commits (using your second commit message) and update your pull request (with git push origin master -f) and I'll merge it in.

legendtkl commented 8 years ago

Done!

And happy new year. :)

Gazler commented 8 years ago

Thanks, however there are still 2 commits. We only want the text changes.

Currently the first commit changes the check to look for 3 commits, then the second commit changes it back to 2. We don't need this, just a single commit with the text changes.

Hope this makes sense.

Happy new year to you too. :)

legendtkl commented 8 years ago

Sorry for that.

Now it's expected.

Gazler commented 8 years ago

Thanks! :)