Re: how to check remote git repo for updates without pull/fetch
- From
James Cloos <cloos@jhcloos.com>
- Date
- Dec 20, 2008, 17:32 UTC
- Message-ID
- <m3skoi21m3.fsf@lugabout.jhcloos.org>
- In-Reply-To
- <494BC89F.9070107@gmail.com>
Here is the script I use:
#!/bin/bash # # does this git repo need a pull? # l=$(git log|head -1|awk '{print $NF}') r=$(git ls-remote origin heads/master|awk '{print $1}') test "${r}" != "${l}"
-JimC
-- James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6