Subject: Re: [PATCH v3 15/15] rebase: change the default backend from "am" to "merge"

From: Jonathan Nieder <[email-masked]>
Date: Thu, 16 Jan 2020 08:06:24 +0000

Jonathan Nieder wrote:

> 	#!/bin/bash
> 	# Sync gh-pages branch with master
> 	#########################################
> 	git checkout gh-pages
> 	git rm -rf -q .
> 	git checkout master -- .
> 	git add .
> 	git commit -am "Syncing gh-pages with master"
> 	git checkout master

Correction: I misread this one.  It was guarded with

	if [ `git rev-parse --abbrev-ref HEAD` == "master" ]; then
		...
	fi

which makes all the difference.  Another example is to compute ctags:

	#!/bin/sh

	~/bin/hook_ctags.sh >/dev/null 2>&1 &

Here's a fun one that updates a timesheet:
https://github.com/GokhanArik/git-hooks-timesheet

Sorry for the noise,
Jonathan