-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete file from index SHOULD NOT delete file on FTP #17
Comments
i disagree. |
Remote files aren't necessarily a copy of the index. There can be uploaded files by the user, or explicitly remotely changed files (config, htaccess) Consider this use-case: Adding it to .gitignore doesn't help when it's already tracked. Dunno if python-git can see the difference between a removed file and index-removed only file, that leaves working tree files alone. |
Closed it by accident, can't see a way to reopen it. |
perhaps an option could be added to the config file or some form of git-ftp only .gitignore file. |
We should be diffing against HEAD, which is not the index, so this is pretty mysterious. I'll take a look. |
I can't reproduce, so I'll need explicit instructions. W.r.t. to not uploading certain files, sure, that's a reasonable feature request. Please open another issue? |
I will look it to it later, and see if I can make a reproducible example. |
Can easily reproduce. Create a repository with 2 files, add one to ignorelist, remove it from cache, it will be deleted on FTP. By maybe that's default operation, because it's removed from the repository, and git rm --cache is only a local command to leave it in local working directory. I don't know if the repository (HEAD, index) has any clue if a a |
It's still difficult to parse what you're saying. Can you write down the precise commands you are using? |
Sorry, a bit late. 1 create new dir html with 2 files index.php and .htaccess I need a different .htaccess locally then on the ftp server. But I don't know if the index, or to be specific the post-update hook can make a difference between a |
I removed a file from the index
git rm --cached file
and it was deleted on FTP, while it shouldn't.
--cache
Use this option to unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone.
The text was updated successfully, but these errors were encountered: