1

I created a new branch called new based on develop (clone). At the beginning I messed up by accidentally committing 100MB+ file. A few days later, I tried to push to remote and it failed because of this big file. I haven't found another way to remove this file than to remove all history (now the branch new has only one commit). How can I merge this branch with develop so new contains all history from develop ?

I've cloned the repo with:

git clone http://...

And then

git checkout -b new develop

Current new state:

rm -rf .git
git init
...

I could make another branch from develop, overwrite it with new files, commit and merge back to develop, but that would make all my deleted files stay.

Community
  • 1
  • 1
Dalius
  • 726
  • 1
  • 8
  • 19
  • 3
    See. http://stackoverflow.com/questions/3458685/how-can-i-completely-remove-a-file-from-a-git-repository – Ryhnn Jul 25 '13 at 19:39
  • I don't have a copy which still contains the history. – Dalius Jul 25 '13 at 20:01
  • @Dalius please add more details about how you created `new` the first time, and how you got it to its current state now. Please add the commands used. Is it possible to add a `git log` to your question? Also, [How can I completely remove a file from a git repository?](http://stackoverflow.com/questions/3458685/how-can-i-completely-remove-a-file-from-a-git-repository) could still apply if the commit is still recorded in your reflog and your repo hasn't garbage collected dangling commits yet. –  Jul 25 '13 at 22:42

0 Answers0