0

I was trying to add a large data file to my git repository from my local machine. While pushing, I realized that there is a size limit on the file and it can not be pushed to the git repository. I tried to add a smaller file instead but the previously committed large file is blocking any pushes. I did add the file through the website and merged some collaborators changes. Here is the tree:

* 3cab70a (HEAD, master) FIX: fixing gpu synch bug.
*   1a1af92 Merge branch 'master' of github.com:blade/Project_B
|\  
| *   c6401fd (origin/master) Merge pull request #1 from blade/shen_debug
| |\  
| | * 623e412 (origin/shen_debug) [Debug-Only] Use CUDA events to measure forward delay
| |/  
| * 41e861d Add files via upload
* |   f2ebd6b Merge branch 'master' of github.com:blade/Project_B
|\ \  
| |/  
| * d58cab0 Update job.sh
* | d016878 adding data folder
* | 5485106 Revert "ENH: adding data"
* | f1cc34d ENH: adding data
|/  
* 390b757 Adding working code
  1. How can I remove that large file from commits so that I can push further changes?
  2. How can I interpret this tree?
Blade
  • 984
  • 3
  • 12
  • 34

1 Answers1

1

You need to basically rewrite the history of your master branch to exclude that data. It's the mere existence of that commit that's preventing you from pushing your changes. Since it's not actually in the origin yet, doing a revert is unnecessary.

There's a couple of ways you can do this, easiest would be to rebase (interactive) onto origin/master skipping the bad commits. That should clean out the bad commits and simultaneously update your branch. You could then push your changes.

Jeff Mercado
  • 129,526
  • 32
  • 251
  • 272