Skip to content

Instantly share code, notes, and snippets.

jschaefer-workmatrix /
Last active August 30, 2018 09:46 — forked from mwise/
Git hook to prevent merging staging branch into any other branch

To use this hook:

  • add the prepare-commit-msg file at .git/hooks/prepare-commit-msg and edit as needed
  • make it executable: chmod +x .git/hooks/prepare-commit-msg
  • disable fast-forward merges: git config branch.master.mergeoptions "--no-ff"
  • that's it!

NOTE: after a failed merge from a forbidden branch, the working tree will still be in a MERGING state. To discard the local working copy state, run: git reset --merge

$.fn.equalHeightSlickSlider = function() {
$slider = $(this),
$slides = $('.slick-slide', $slider),
$slideitems = $('> div', $slides),
slideCount = $slides.first().find('> div').length,
slideHeight = 0