5

I have about 40,000 lines of C++ code in 12 projects. Each project has a different git. I have shell script which make the installation of my software, put the NoSQL database, create directories etc. It creates also a source directory for every project. I use the clone “git clone”

The problem:

When I have a change and make a local “commit” I cannot “push” in my main repository, Due to “git push rejected -non -fast forward”... I am the only one who has access to the files. So it is not possible “The push is failing because my refs are behind those of the remote repository.”

PS The Operating system is Linux/Ubuntu

edit 1

local

git log --graph --pretty=oneline –abbrev-commit
* 5e540fd Founder initial commit  ver 2

main

git log --graph --pretty=oneline –abbrev-commit
* 74acd89 Founder initial commit

edit 2

I just done everything using CLI instead of the eclipse. So manually I have no problems

main

git log --graph -–oneline
* 45f84ae ver 2
* 74acd89 Founder initial commit

clone

git log --graph --oneline
* 45f84ae ver 2
* 74acd89 Founder initial commit

In the first place (edit 1) I was using the eclipse in order to make a) the local commit and b) the push

Now I was use the terminal and it is working as a charm, but I don't understand yet the problem with eclipse

PS

I can not add the eclipse tag :-(

user1675224
  • 213
  • 2
  • 12
  • 5
    You probably need to pull upstream changes first. Use `git fetch --all` and a repository visualiser that will show you remote branches to see what could be the issue. Even if you're the only one with the repo you could've forgotten something or did something that caused a stray remote commit. – millimoose Aug 04 '13 at 12:13
  • 1
    Related: [What's a “fast-forward” in Git?](http://stackoverflow.com/questions/4684352/whats-a-fast-forward-in-git). –  May 18 '14 at 17:04

1 Answers1

5

I had the bad habit to press the “commit amend” button because i wanted to have the previous commit message. I didn't realize that I actual made a amend... Now Everything work as a charm.

Thank everybody for the help :-)

user1675224
  • 213
  • 2
  • 12