2013-04-05 13 views
2

J'ai accidentellement ajouté et validé un fichier de mon dépôt local que je ne veux pas ajouter au dépôt de mon projet GitHub. Puis-je supprimer ce fichier avec le terminal ou puis-je le supprimer manuellement en ligne?Comment supprimer un seul fichier dans GitHub?

+2

double possible de [Comment puis-je supprimer un COMMIT github?] (Http://stackoverflow.com/questions/448919/how-can-i -remove-a-commit-on-github). Jetez un coup d'œil à [cette réponse] (http://stackoverflow.com/a/449070/464744). – Blender

+0

Dupliquer de [Comment puis-je supprimer un fichier de repo git?] (Http://stackoverflow.com/q/2047465/456814). –

Répondre

5

ligne de commande, vous pouvez faire suivant:

git rm <file> - remove file locally and marks it for deletion 
git commit -m"your message" - commit file to local repo 
git push origin master - push the change to github. 
Questions connexes