Skip to content

Instantly share code, notes, and snippets.

@jaygaha
Created December 26, 2024 01:12
Show Gist options
  • Save jaygaha/e62088e61a1ae8c156e400ba9e549c93 to your computer and use it in GitHub Desktop.
Save jaygaha/e62088e61a1ae8c156e400ba9e549c93 to your computer and use it in GitHub Desktop.
Rename a directory or file name in a Git repository that has already been pushed.

In a Git repository, how to properly rename a directory/file name already pushed?

Normally, simply renaming a directory or file name does not reflect in the remote repository.

Syntax:

git mv casesensitive tmp
git mv tmp CaseSensitive

Commit the changes and push it. This will update the directory or file name in the remote repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment