only commit renamed file in github code example Example: git rename file $ git mv old_filename new_filename