git mv oldname newname
is just shorthand for:
mv oldname newname
git add newname
git rm oldname
i.e. it updates the index for both old and new paths automatically.
More Related Contents:
- Handling file renames in Git
- Trying to understand `git diff` and `git mv` rename detection mechanism
- How do I force "git pull" to overwrite local files?
- How do I revert a Git repository to a previous commit?
- How to list only the names of files that changed between two commits
- How do I revert all local changes in Git managed project to previous state?
- Is there a way to cache https credentials for pushing commits?
- How can I see the changes in a Git commit?
- How can I debug git/git-shell related problems?
- How line ending conversions work with git core.autocrlf between different operating systems
- How do I properly force a Git push?
- How can I have multiple working directories with Git?
- What are some examples of commonly used practices for naming git branches? [closed]
- git reset –hard HEAD leaves untracked files behind
- How do I commit only some files?
- Is there a way to “autosign” commits in Git with a GPG key?
- Git Blame Commit Statistics
- Git: Possible to use same submodule working copy by multiple projects?
- Definitive retroactive .gitignore (how to make Git completely/retroactively forget about a file now in .gitignore)
- Removing multiple files from a Git repo that have already been deleted from disk
- Git merging within a line
- Git checkout with dot
- How would I write a pre-merge hook in Git?
- Are there any downsides to enabling git rerere?
- How do I check if a repository is bare?
- Switch branch and ignore any changes without committing
- git recover deleted file where no commit was made after the delete
- Pushing a large github repo fails with “unable to push to unqualified destination: master”
- How to derive application build version string with Git’s `describe` command?
- Git hangs while writing objects