git rename folder code example Example 1: git remanme folder git mv <old name> <new name> Example 2: rename file in git $ git mv old_filename new_filename