0

I'm trying to push my code in Github but the CSV file keeps causing problems I don't want a CSV file in my GitHub. How can I exclude the CSV file while doing a git push?

Here's what I tried :

enter image description here

  • I added file to .gitignore
  • I remove it from GitHub by rm ./file.CSV
  • I remove the cache by git rm --cached ./file.CSV
  • I'm currently pushing it without CSV but it still adds CSV

I think the problem is I accidentally added CSV in 0.65 and I can't commit master since.

  • *Every* commit saves *every file* for all time. So when you make a commit with a large file in it, the large file is saved. When you make another, later commit that removes the file, you make a commit that doesn't have the file, that comes after the commit that *does* have the file. You still have the commit that has the file. Adding more commits won't help. You must "delete" the entire chain of commits. Technically it's impossible to delete *any* commit, but there's a technical workaround that gets you close enough. – torek Dec 22 '21 at 23:37

1 Answers1

1

As far as I know, if you made a commit, you cant "unmake it" without reverting the whole commit, but only make another commit that does what you actually intended. After a commit is made - or several, you can push them all at once to GitHub, I havent seen an option to push a single commit out of the 2 (for example) made.