I backed up my database to GIT just so I could get the db at my home computer.
I don't want this file to be versioned, it was just a 1 time thing really.
Can I delete it for good so GIT doesn't keep track of it going forward or historically?
The easiest way to delete a file in your Git repository is to execute the “git rm” command and to specify the file to be deleted. Note that by using the “git rm” command, the file will also be deleted from the filesystem.
You can delete an individual file or an entire directory in your repository on GitHub. People with write permissions can delete files or directories in a repository.
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.
I always find Guides: Completely remove a file from all revisions feed helpful.
To remove the file called
Rakefile
:git filter-branch --force --index-filter \ 'git rm --cached --ignore-unmatch Rakefile' \ --prune-empty --tag-name-filter cat -- --all
This command will run the entire history of every branch and tag, changing any commit that involved the file
Rakefile
, and any commits afterwards. Commits that are empty afterwards (because they only changed the Rakefile) are removed entirely.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With