0

I'm using GitHub as my GIT repository. Recently I committed a huge folder of images, and now when I do a push, the process fails after about 10 minutes.

I have learned my lesson not to commit big files at the same time, but right now I'm kinda locked. I went through the images and using TortoiseGIT, I selected "Delete (Keep Local)" option, but still when I do a push, the process takes forever and I can still see the same number of objects being calculated, and the process fails again.

Is it possible to remove the images from queue? I can use the command line too if there is a solution. Thanks

farjam
  • 2,089
  • 8
  • 40
  • 77
  • did you already upload the commits you did with those images? can you undo all those commits, go to a previous state and push again? – iberbeu Mar 05 '13 at 21:11
  • No, the images never finished uploading. How do I "undo" a commit? – farjam Mar 05 '13 at 21:14
  • that means that in github you have the old version that works? the changes you did locally are not in github and only in your machien? – iberbeu Mar 05 '13 at 21:29
  • Exactly, the changes are still on my local machine and not in github yet. – farjam Mar 05 '13 at 21:30
  • Similar case has been solved in this question http://stackoverflow.com/questions/2702731/git-fails-when-pushing-commit-to-github – AnkitG Mar 05 '13 at 21:45

1 Answers1

0

If the changes that you did are only in your local repository you can just remove your local repository and clone it again from github. This is the easy way: you just clone a new working copy and forget about undoing things unnecessarily

if you don't want to do that you can always undo the already done commits. Just find the commit you want to back up to (you can find this using among others gitk --all) and execute this command

git reset --hard <sha1_commit>
iberbeu
  • 15,295
  • 5
  • 27
  • 48
  • Thanks, this was what I was looking for. For those who use TortoiseGIT, you can do this by right clicking the repository, click show log, right click on the commit that you want to go back to, and select "Reset master to this", and choose the hard option. – farjam Mar 05 '13 at 21:51