This is the first time for me using git (on bitbucket.org - if that makes any difference) and I committed a few audio files to the repo which I obviously don't want there. I added then added the paths to the .gitignore to find out that this will only ignore further changes. So I stumbled upon this SO question and tried to use David Underhill's script that's mentioned there.
However, now I'm getting the following message for git commit
:
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 10 and 10 different commits each, respectively.
#
nothing to commit (working directory clean)
and for git push
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://bitbucket.org/abc/def'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
So I tried a git push --force
which succeeded but didn't actually change anything in the repo and doesn't even show up there.
Do you know how I could fix this?