Skip to content

Instantly share code, notes, and snippets.

@krisleech
Last active March 19, 2018 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisleech/332d20a779e189c0a6693bade9d32020 to your computer and use it in GitHub Desktop.
Save krisleech/332d20a779e189c0a6693bade9d32020 to your computer and use it in GitHub Desktop.
Git renamed bug
mv roles/deploy/drone-deployment roles/deploy/drone
mv roles/deploy/transparent-proxy-deployment roles/deploy/transparent-proxy
git status
deleted:    roles/deploy/drone-deployment/tasks/apachesite.yml
deleted:    roles/deploy/drone-deployment/tasks/deployer_name.yml
deleted:    roles/deploy/transparent-proxy-deployment/tasks/apachesite.yml
deleted:    roles/deploy/transparent-proxy-deployment/tasks/deployer_name.yml

untracked
	roles/deploy/drone/
	roles/deploy/transparent-proxy/
git add .
git status
renamed:    roles/deploy/drone-deployment/defaults/main.yml -> roles/deploy/drone/defaults/main.yml
renamed:    roles/deploy/drone-deployment/handlers/main.yml -> roles/deploy/drone/handlers/main.yml
renamed:    roles/deploy/transparent-proxy-deployment/tasks/apachesite.yml -> roles/deploy/drone/tasks/apachesite.yml
renamed:    roles/deploy/transparent-proxy-deployment/tasks/deployer_name.yml -> roles/deploy/drone/tasks/deployer_name.yml

The apachesite.yml and deployer_name.yml do have identical content. But the rename was not as indicated.

This happens with both manually mv-ing files and git mv.

The total number of renamed files was much larger and there where many false "renamed"'s indicated in git status output.

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