Reply to post: Re: Bah! (no Git alllowed)

Get ready to patch Git servers, clients – nasty-looking bugs surface

Stevie Silver badge

Re: Bah! (no Git alllowed)

It turns out to be ridiculously easy to write a poor man's Git.

vi pmgit

i

#!/bin/ksh

ls ${1}*.old | sort -r > filelist

while read myfile

do

cp myfile myfile.old

done < myfile

cp $1 $1.old

(esc)

ZZ

chmod 777 pmgit

Then, as needed: pmgit [filename]

Job done.

I was going to add code to make it work in different directories but then I thought "why not just put a copy of pmgit in every directory on the computer and be done?"

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

SUBSCRIBE TO OUR WEEKLY TECH NEWSLETTER

Biting the hand that feeds IT © 1998–2021