git mv - libgit2/libgit2sharp GitHub Wiki
The following examples assume you already have a repository in place to work with. If not, see git-init.
Move a file to a new location.
$ git mv <file> <new/path>
using (var repo = new Repository("<repoPath>"))
{
// Moves the file. Path must be in Posix format (using '/' as path separator)
Commands.Move(repo, "<file>", "<new/path>")
}
Rename a file.
$ git mv <file> <path/to/file>/<newname>
using (var repo = new Repository("<repoPath>"))
{
// Renames the file. Path must be in Posix format (using '/' as path separator)
Commands.Move(repo, "<file>", "<path/to/file>/<newname>")
}