On Tue, May 06, 2025 at 11:42:37AM -0700, Junio C Hamano wrote: > shejialuo <shejialuo@xxxxxxxxx> writes: > > > + touch .git/packed-refs && > > Unless you want to signal your readers that you care about file > timestamp somehow, don't use "touch" as a means to create a file. > Readers would have to wonder if .git/packed-refs existed before, > or what git command that follows this part cares about its last > modified time, or what behaviour the timestamp would affect. > > What you are interested in doing with this is to ensure that *AN* > *EMPTY* file exists there, hence you should say > > >.git/packed-refs && > > instread. Thanks for the suggestion, I didn't realise about this.