0

I would like your help with my git situation: yesterday I pushed some new files into the remote repository without noticing I added some new files which I didn't want to. I think I stopped the pushing while it was working without seeing the console output (I was in a rush). I have been keep working and today I realized that all the new pushes into the remote repository would take time as if they tried to push the huge missing files.

I have changes other files and I would like to keep all the files in my working tree, restore/revert/delete the faulty canceled commits and pushes of these days and push my current working tree to the remote repository restoring it and without the huge files (I added them to the gitignore and I removed them with git rm --cached).

I did some tries with git and I am worried it's too late to restore my repository. Since I am new to git I would like your help to analyze my situation and tell me the commands I should use. Thanks!

Luca
  • 85
  • 1
  • 10
  • 1
    "I think I stopped the push" - first thing to do is *check* this. – Oliver Charlesworth Dec 20 '17 at 12:17
  • The remote repository does not show the commits/pushes I did these days. The last push showed is the first faulty one when I stopped the push. I saw the commit log and it shows that some files were added and some modified. There is nothing about the faulty huge files (it doesn't show it added them). My local repository is ahead of the master remote one – Luca Dec 20 '17 at 12:20

0 Answers0