Link to home
Start Free TrialLog in
Avatar of userTester
userTesterFlag for United States of America

asked on

Delete a single file from remote GitHub repository

Hi there,

I am new to GitHub, and I've gone through a few video tutorials and GitHub help articles, but I still don't think I understand how it works.

Can a single file in my remote GitHub repository be deleted from a GitBash command prompt on my computer?

I've tried this from GitBash:
$ git remote rm https://github.com/myGitHub/myRepository/myFile.zip
 error: Could not remove remove config section 'remote.https://github.com/myGitHub/myRepository/myFile.zip'

Open in new window


The error doesn't sound good, so I assume it's the wrong command??
ASKER CERTIFIED SOLUTION
Avatar of Mlanda T
Mlanda T
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of userTester

ASKER

Thanks MlandaT,

What do you mean by
If the file has no changes staged in the index
?
Basically... just if the file you are deleting has any changes that havent been pushed/committed.
Thanks Mlanda, it worked perfectly!