News for hackers. Stuff that matters.
Re:GitHub Cheat Sheet by lubomir on Sunday April 13, 2014 @05:52AM (#7580835)
Could someone give me a usecase for when an empty commit might be useful?
Re:GitHub Cheat Sheet by davej on Sunday April 13, 2014 @06:11AM (#7580873)
Annotating the start of a new bulk of work or a new feature. Documenting when you make changes to the project that aren't code related, e.g. "Now using GitHub for issue tracking, closes #1". Communicating with people using your repo, e.g. "Merry Christmas y'all, I'm away for three weeks, if you have any questions please contact Jim".

I'm not saying doing any of these things is good practice but they are use-cases for when an empty commit might make sense.

Re:GitHub Cheat Sheet by daGrevis on Sunday April 13, 2014 @05:56AM (#7580840)
To tell CI (for example, Jenkins) to rebuild.
Re:GitHub Cheat Sheet by reledi on Sunday April 13, 2014 @11:30PM (#7584371)
You can often trigger a rebuild for such services via their web UI.
Re:GitHub Cheat Sheet by epidemian on Sunday April 13, 2014 @06:09AM (#7580868)
To make a commit to a Gist look the same as changes done through the web interface.

Edit: sorry, i was thinking about --allow-empty-message, not --allow empty.

Re:GitHub Cheat Sheet by nahname on Sunday April 13, 2014 @09:42AM (#7581277)
Opening a PR to discuss a new feature before it is built.
Re:GitHub Cheat Sheet by roryokane on Sunday April 13, 2014 @01:17PM (#7581947)
You can also do that by just creating an Issue, and then converting it to a Pull Request later with `hub pull-request -i <existing-issue-num>`, when you actually have some code to commit. That uses the software Hub, mentioned in the cheat sheet. Or instead of installing Hub, you can convert the Issue using one of the other methods listed in http://stackoverflow.com/q/4528869/578288.
Re:GitHub Cheat Sheet by reledi on Sunday April 13, 2014 @11:29PM (#7584367)
I don't recommend converting issues to Pull Requests. See the discussion here which goes into details: https://github.com/github/hub/commit/4f70dd126f46dec14fc341c...
Re:GitHub Cheat Sheet by bnferguson on Sunday April 13, 2014 @10:21AM (#7581370)
I use this constantly. Building a PR up with lot of people watching and involved is pretty amazing. Certainly don't need to all the time, but when working on something sensitive or still ambiguous it's invaluable. So many of my PRs have 50-70 comments by the time they go in.

Amazing review at every step of the way.

Re:GitHub Cheat Sheet by reledi on Sunday April 13, 2014 @11:32PM (#7584378)
Fantastic suggestion! I always disliked opening a PR after my first code change. Will definitely start using this :)
Re:GitHub Cheat Sheet by raju on Sunday April 13, 2014 @04:23PM (#7582831)
I usually initialize my git repos with an empty commit. Several reasons why this is a good idea (detailed in this blog post - http://kevin.deldycke.com/2010/05/initialize-git-repositorie...)

I have a git alias for the same -

  start = !git init && git commit --allow-empty -m \"chore: empty initial commit\"
Note: That's not my blog.