Adding in README page to project causes error in pushing new changes

Hello,

I was just reporting this. I don’t know if it is a but or a “feature”. Basically, I created a project. I then pushed code to the project. After working for a bit, I saw that the README page was not defined. After logging into GIT and defining it (and saving it).

Afterwards, I went back to my coding. I tried to push new changes and got the following:

Casey@greatkc MINGW64 ~/WaveMaker 6.7.0.RELEASE/projects/Landscape (master)
$ git push origin master
Enter passphrase for key ‘/c/Users/Casey/.ssh/id_rsa’:
To git@192.168.1.70:postx-wavemaker-code/postx-landscaping.git
** ! [rejected] master → master (non-fast-forward)**
error: failed to push some refs to ‘git@192.168.1.70:postx-wavemaker-code/postx-landscaping.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.

I tried “git pull” but this did not work.l I still kept getting the error. I even tried rebasing and this also did not work.

I just deleted the repository and created a new one - but - for the future, how could one get around this problem?

Thanks!

I stumbled upon this from Unable to delete project

I am unable to replicate this error using the steps you have provided.

i.e.

  • Created a new rails project.
  • Removed the README
  • Initialized a git repo in the project: git init
  • Added, committed and pushed the changes to a remote repo on GitLab.
  • Here I was prompted that ‘The project does not have a README defined. Click here to add a README’.
  • I then added the README from GitLab and committed.
  • Then I pulled the changes to my local machine. Made some small changes, committed and pushed to GitLab.

I know this is a bit late, but if I was able to obtain the output when you git pull or rebase then I would be of more help.

Feel free to reply if you ever encounter this anymore :stuck_out_tongue: