0

I have these files and want to push them to github.

enter image description here

So naturally, I ran the following commands

git add *\*.py 
git commit -m "cleaning"
git push origin master

However, this produced the following error.

Abrahams-MBP:text_classification abrahammathew$ cd /Users/abrahammathew/Desktop/carecloud/carecloud_doc_extraction/text_classification/ 
Abrahams-MBP:text_classification abrahammathew$ git add *\*.py 
Abrahams-MBP:text_classification abrahammathew$ git status
rebase in progress; onto 149cf03
You are currently rebasing branch 'master' on '149cf03'.
  (all conflicts fixed: run "git rebase --continue")

nothing to commit, working directory clean
Abrahams-MBP:text_classification abrahammathew$ git commit -m "cleaning"
rebase in progress; onto 149cf03
You are currently rebasing branch 'master' on '149cf03'.

nothing to commit, working directory clean
Abrahams-MBP:text_classification abrahammathew$ git status
rebase in progress; onto 149cf03
You are currently rebasing branch 'master' on '149cf03'.
  (all conflicts fixed: run "git rebase --continue")

nothing to commit, working directory clean
Abrahams-MBP:text_classification abrahammathew$ git push origin master
To https://github.com/springml/carecloud_doc_extraction.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/springml/carecloud_doc_extraction.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and 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.
Abrahams-MBP:text_classification abrahammathew$ 

It seems I'm unable to even create a local commit of these files.

How can I get this to work?

2
  • As git status says, you are in the middle of a rebase. Finish or abort your rebase before doing anything else. Watch out: work-tree files you fuss with during your rebase can make it hard to finish or abort your rebase, and if you commit them and then abort your rebase, they will vanish because they were in commits that the rebase was building. (So, you might want to save these files elsewhere, if you're going to abort the rebase) Commented Oct 12, 2018 at 0:50
  • *\*.py looks wrong. Did you mean */*.py? Commented Oct 12, 2018 at 9:35

2 Answers 2

3

As you are in a middle of a rebase, You can either continue it with git rebase --continue or you can abort it entirely with git rebase --abort. After that you can add and commit and push your files.

Sign up to request clarification or add additional context in comments.

Comments

2

You are currently rebasing branch 'master' on '149cf03'. (all conflicts fixed: run "git rebase --continue")

This, quite strongly :), suggests that you are in a middle of a rebase.

You need to finish the rebase (git rebase --continue), or abort it, and then you things should start appear normal.

You should not be pushing in a middle of a rebase.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.