Search notes:

git mv

Move or rename a file, a dirctory or a symlink.

fatal: bad source, source=path/to/*.…, destination=another/path/

When trying to use a wildcard in PowerShell to rename a set of files, git mv might throw a fatal: bad source, source=path/to/.…, destination=another/path/* error.
The following command is supposed to move all SQL files to a sub directory named db-objects:
PS> git mv  *.sql  db-objects
fatal: bad source, source=errors/*.sql, destination=db-objects/*.sql
This is because PowerShell does not expand wildcards by default.
The wildcard needs to be expanded explicitly:
Ps> git mv (get-childItem *.sql) db-objects
get-childItem can be abbreviated with its alias gci:
Ps> git mv (gci *.sql) db-objects

See also

git commands

Index