I followed the steps given as answer to the following question: How to remove a directory from git repository?
However when I execute (last command out of 3)
git push origin master
I get the following error (which I couldn't resolve even when trying to push files/folders without --force):
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/dragGH102/leaderboard-meteor.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I tried with
git pull origin master
but it opens a CLI Interface on which I don't know how to interact (I'm on Linux).
How do I fix this issue?
EDIT _ full shell content:
git rm -r .meteor
> git commit -m "Remove extra directory"
[master e901990] Remove extra directory
1 file changed, 10 insertions(+), 1 deletion(-)
> git push origin master
Username for 'https://github.com': dragGH102
Password for 'https://dragGH102@github.com':
To https://github.com/dragGH102/leaderboard-meteor.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/dragGH102/leaderboard-meteor.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
> git pull origin master
# open GUI (no idea how to interact here and what to do)
Merge branch 'master' of https://github.com/dragGH102/leaderboard-meteor
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
[ line 1/8 (12%), col 1/73 (1%), char 0/300 (0%) ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell