From: Konstantin Ryabitsev Date: Thu, 05 Jun 2025 14:02:40 GMT Subject: Re: Fetch remote only if remote hasn't been fetched recently Message-ID: <20250605-flying-lemon-junglefowl-4c1d64@lemur> In-Reply-To: On Thu, Jun 05, 2025 at 12:16:26PM +0100, M Hickford wrote: > Hi. I'd like to fetch from a particular remote, but only if that > remote hasn't been fetched in the last hour. How could I achieve this? > Is there a relevant option for `git fetch`? Not to my knowledge, but you can either look at the timestamp of FETCH_HEAD (if that's the only remote you're fetching), or wrap git-fetch in a small script that touches .git/last-fetched-foo file and you can then check that file and exit if it's newer than 1 hour ago. -K