I'm using phpFog and have been deploying via git push -f <repo>
to overwrite existing contents on the server. Some of my deployments were from totally different repos, as I was experimenting with some things.
I've found a file from a previous push, which no longer exists in the currently pushed repo, is lingering on the server. I can delete that file (via a php script), but each new push to the server will re-create that file -- even when the newly pushed repo doesn't contain it.
Lesson learned is to not push w/ force, I supposed -- but why is that random file being recreated when pushing repos that don't contain it?!
Again here is what I'm seeing:
- git push -f repo_1 (contains random.txt)
- random.txt exists
- I delete all files, random.txt is now gone
- git push -f repo_2 (does not contain random.txt)
- random.txt exists again (why?!)
EDIT: I'm assuming that forcing changes to the repo leaves older files still being tracked, even if the new repo never tracked them. I've modified my deploy method to now clone what is on phpFog, git remove everything, and add in my new files before pushing. https://github.com/swt83/phpfog-deploy
git rm --cached random.txt
) and commit that. – Kiesha