$ git clone -n https://src.fedoraproject.org/rpms/beep.git /var/lib/mock/f40-build-760433-121099/root/chroot_tmpdir/scmroot/beep Cloning into '/var/lib/mock/f40-build-760433-121099/root/chroot_tmpdir/scmroot/beep'... $ git reset --hard 1cb1544375936c1c444f5cc51032b8b4e683a3bb HEAD is now at 1cb1544 On EL7, use #!/bin/sed instead of #!/usr/bin/sed