commit dab6d6fcbcba4b0f05c2297301e384ea58e26a33 from: Stefan Sperling date: Mon May 06 11:46:51 2024 UTC in got.1 EXAMPLES, mention how files can be moved or renamed based on an initial patch by Matthias Schmidt commit - 75bbb53178bc07949826c81f52ea9f5f042b43e4 commit + dab6d6fcbcba4b0f05c2297301e384ea58e26a33 blob - adc1a793e253541b83360e9a96a100b0dfcebe65 blob + 0e665f95953ac4cc1f0f6a97331b5de8d00fb0bc --- got/got.1 +++ got/got.1 @@ -3936,7 +3936,19 @@ Add new files and remove obsolete files in a work tree .Pp .Dl $ got add sys/uvm/uvm_ubc.c .Dl $ got remove sys/uvm/uvm_vnode.c +.Pp +A file can be renamed or moved by removing it from its old location +and adding it at the new location: +.Pp +.Dl $ cp oldfile.c newfile.c +.Dl $ got remove oldfile.c +.Dl $ got add newfile.c .Pp +.Nm +does not yet follow file history across renames, but +.Xr git 1 +will be able to do so regardless. +.Pp Create a new commit from local changes in a work tree directory with a pre-defined log message. .Pp