git commit --allow-empty
Sometimes I need to make empty commits on throw away branches so that I can trigger various kinds of things for a variety of different reasons. As an example, today I wanted to test integration between GitHub and Flowdock. Once I thought I had the two configured correctly I made the following commit:
$ git commit --allow-empty -m "Trigger notification"
More convenient than adding spaces to your README!
Note I obviously made this commit to a branch other than master. In my situation above I used a branch named throw-away
Written by Michael
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#