Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing code from GitHub

Tags:

git

github

Is there a way to entirely remove a directory and its history from GitHub?

like image 480
namin Avatar asked Jan 14 '09 17:01

namin


People also ask

Can you delete from GitHub?

You can delete your personal account on GitHub at any time. Deleting your personal account removes all repositories, forks of private repositories, wikis, issues, pull requests, and pages owned by your account.

How do I remove HTML from GitHub?

Simply view any file in your repository, click the trash can icon at the top, and commit the removal just like any other web-based edit. Then " git pull " on your local repo, and that will delete the file locally too.


1 Answers

If you are asking about deleting a project from GitHub, open your project, click the "Admin" tab (or browse directly to https://github.com/username/project_name/edit) and on the bottom of the page, click "Delete This Repository". It'll ask you to confirm this, and then it's gone.

If you just want to erase a part of your repository, you need to do it to your git repository and push it to GitHub.

GitHub has written a howto about this in their FAQ. I Haven't tried this myself, so I can't guide you further, but you probably can manage this yourself here on.

In either case, this, naturally, doesn't delete any third party pulls – if someone has pulled the repository before you deleted it, it's out, without you being able to do much about it (other than trying the "pretty please"-technique).

like image 93
Henrik Paul Avatar answered Sep 30 '22 21:09

Henrik Paul