« first day (3 days earlier)   

7:40 AM
@knittl Hello again, I will highlight your name in future messages then.
here is the output
C:\Users\maqja\Documents\PROYECTOS_INE\INE_COTER_CNI>git diff main origin/main
diff --git a/doc/despliegue/creacion_entornos-pro.docx b/doc/despliegue/creacion_entornos-pro.docx
deleted file mode 100644
index 18873fd..0000000
--- a/doc/despliegue/creacion_entornos-pro.docx
+++ /dev/null
@@ -1,53 +0,0 @@
- DATOS DEL PROYECTO
-Entorno solicitado: Producción
-Descripción de la aplicación: Web para realizar consultas sobre los datos territoriales de habitantes desde el CNI.
The document creacion_entornos-pro.docx is the one I just added, it didn't exist in the remote branch
 
 
1 hour later…
8:41 AM
@maqjav can you also do git diff origin/main^ origin/main? thank you
 
@knittl It doesn't show changes
C:\Users\maqja\Documents\PROYECTOS_INE\INE_COTER_CNI>git diff origin/main^ origin/main

C:\Users\maqja\Documents\PROYECTOS_INE\INE_COTER_CNI>
 
@maqjav and git diff main^ main?
and if origin/main doesn't show any changes to its parent, can you do the following again?

```
git rev-parse origin/main^{tree}
git rev-parse origin/main^^{tree}
```
 
 
1 hour later…
9:48 AM
@knittl I just noticed that the cmd I used for the previous git wasn't working as intended. Now I tried with the git console as with the previous tests and this is what came out
maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$ git diff origin/main^ origin/main
diff --git a/README.md b/README.md
index d1b1c34..d3e98ef 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,4 @@

## Descripción

-Proyecto que engloba todas las herramientas necesarias para realizar la consulta de COTER (Consulta de datos territoriales).
-
-Test2
\ No newline at end of file
+Proyecto que engloba todas las herramientas necesarias para realizar la consulta de COTER (Consulta de datos territoriales).
It's showing the latest change I did the other day to remove the "Test2" text I added the to the readme file.
 
@maqjav do you push any other branches or do you only push main?
like, do you do something like "create new branch, change files, commit, push"?
 
No, I only have the branch "main"
The repository is new and we were testing it before working with more branches
 
so the commit in the remote repository is different than your local commit
 
The support of our gitlab responded to me that indeed they have the setting "Merge commit" but that they haven't notice this behaviour with other teams using the same settings, so I think the issue has to be in our Eclipse or the configuration of Egit (the Eclipse git pluging)
 
I'll repeat what I wrote in my comment: https://stackoverflow.com/questions/78662210/git-rejected-non-fast-forward?noredirect=1#comment138687352_78662210

> your push config looks fishy
do you do reset, amend, rebase, squash locally?
did you remove the "test2" text? or who removed it?
if you removed it, how did you remove it? do you have multiple clones of the repository? multiple worktrees?
do you change some files via the gitlab web interface and some locally?
 
9:56 AM
I removed the push config a couple of days ago, this is my config right now:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = https://gitlab.ine.es/padron/coter-cni.git
fetch = +refs/heads/*:refs/remotes/origin/*
puttykeyfile = C:\\Users\\maqja\\.ssh\\id_ed259.ppk
[branch "main"]
remote = origin
merge = refs/heads/main
rebase = false
[gui]
wmstate = zoomed
geometry = 893x435+104+104 227 196
 
okay. that looks sane
 
I don't reset, amend, rebase at all, I'm doing pretty simple changes
I always use the commit/push button in Egit, and Pull if I get the error
I did remove the "test2" text with Eclipse after it worked using the commands yesterday
I only have 1 clone of the repository
And I only use Eclipse, I'm not using the gitlab content editor at all, and I'm the only user right now in the whole project
 
and your local file still contains the "test2" line, correct?
 
No, it doesn't
 
that can't be. please show git diff main^ main again
 
10:02 AM
Here you have it
 
also the output of git log --oneline --graph --decorate main...origin/main (three dots)
 
maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$ git diff main^ main
diff --git a/README.md b/README.md
index d1b1c34..d3e98ef 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,4 @@

## Descripción

-Proyecto que engloba todas las herramientas necesarias para realizar la consulta de COTER (Consulta de datos territoriales).
-
-Test2
\ No newline at end of file
+Proyecto que engloba todas las herramientas necesarias para realizar la consulta de COTER (Consulta de datos territoriales).
If I sync the changes in Eclipse, it shows a conflict in the Readme file, however it shows no changes between my local and remote repository, this is very weird
 
I don't know what "sync changes" does in eclipse
changes between local and remote can only be shown after fetching
 
Here is the screenshot
Im launching the last command you told me, one sec
 
Why does doc/despliegue/creacion_entornos-pro.docx not exist in origin/main?
 
10:05 AM
That's the one it fails to push
failed*
 
you cannot push single files, you can only push commits
 
maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$ git log --oneline --graph --decorate main...origin/main
* 10a5203 (HEAD -> main) [Tareas #7834] Nuevo proyecto COTER_CNI [https://servicios.internos.ine.es/redmine/issues/7834] - Añadido documento de despliegue de PRO.
* 3e83908 (origin/main) - Prueba

maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
 
and what do you mean "failed"? the push went through, if I understood you correctly?
 
I did a commit/push including only that file
It did the commit, but it failed the push with the non-fast-forward error
 
so walk me through again
1. you removed the "test2" line yesterday (?)
2. you added, committed, and pushed (successfully)
 
10:07 AM
Correct
 
all on branch main?
 
Yes
 
and today you added a new file (a docx file) while still on branch main, and it failed when pushing the new commit?
 
Exactly
 
and the parent is not your yesterday's commit, but the parent of yesterday's commit
do you by chance use dropbox or onedrive and is your clone in a synced folder?
 
10:09 AM
no, I'm working in a folder in my hard disk
 
so no automatic "cloud" synchronization? are you 100% certain? I can imagine Microsoft Windows doing OneDrive things even when you have not explicitly enabled it
 
100% sure
we don't use anything like that
 
okay. I have to trust you on this
and the commit on the remote ("removing test 2") is what you did yesterday and it should be there, right?
@maqjav this confuses me. that shouldn't fail to push. main is a direct descendant of origin/main (this message is a reply to your output of log --oneline --graph)
 
is it possible that maybe after pushing my local branch is not updating to the latest index?
 
can you run git fetch --all, post its output and then do git log --oneline --graph --decorate main...origin/main again?
 
10:15 AM
give me a sec
maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$ git fetch --all

maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$ git log --oneline --graph --decorate main...origin/main
* 10a5203 (HEAD -> main) [Tareas #7834] Nuevo proyecto COTER_CNI [https://servicios.internos.ine.es/redmine/issues/7834] - Añadido documento de despliegue de PRO.
* 3e83908 (origin/main) - Prueba

maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$
 
it's still a direct child
git rev-parse main, git rev-parse main^, git rev-parse origin/main please
 
maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$ git rev-parse main
10a520366c36d8ca8e6b897354f01914a6919352

maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$ git rev-parse main^
e207d588cb1096e5f3b68f487da18457c65232a6

maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$ git rev-parse origin/main
3e839083822180de709d3717437f926632a1afd6

maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$
 
why is commit e207d588 not shown in the git log output?
can you please do git log --oneline --graph --decorate --full-history main...origin/main (full history flag)
 
maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
$ git log --oneline --graph --decorate --full-history main...origin/main
* 10a5203 (HEAD -> main) [Tareas #7834] Nuevo proyecto COTER_CNI [https://servicios.internos.ine.es/redmine/issues/7834] - Añadido documento de despliegue de PRO.
* 3e83908 (origin/main) - Prueba

maqja@LM24582P MINGW64 ~/Documents/PROYECTOS_INE/INE_COTER_CNI (main)
 
give me a sec
 
10:23 AM
sure, I'm also busy with other things at work, answer whenever you are able to
 
I need to leave in 30 minutes
 
Don't worry then, we can keep talking on monday
Im also leaving soon
And really, I very much appreciate what you are doing for me ;)
 
alright, I tested. log isn't showing the merge base (I was expecting it, but it's not the case)
can you send a screenshot of the history from gitk main...origin/main?
 
¿¡Are you 120% certain that you did NOT amend or rebase!? Because looking at the screenshot in https://i.sstatic.net/6cxSRsBM.png the committer and author times are different. It was authored 2 days ago and committed yesterday. it matches the timestamp of the remote commit to the exact second.

this only happens if commits are rewritten. another indicator of amend/rebase is that the commit contains both the old and new changes.!
because I am pretty sure that you are amending your commits instead of creating new commits
Do you have the "amend commit" icon selected? wiki.eclipse.org/EGit/User_Guide#Amending_Commits
 
10:39 AM
I did a rebase last week before opening the ticket in stackoverflow doing some tests, but definetlly many commits before opening the ticket
let me check the setting you are asking for
That's it!
It's enabled
I just modified it so it doesn't auto select it
I didn't even noticed
 
glad to have it figured out
 
and honestly, if I would have I wouldn't have known what it was doing
 
so the next time somebody asks "do you amend" and you answer "no, I never use amend", make sure that you are actually telling facts
 
You are right, I should have said I don't know, because really, I didn't know what was that check
Thank you very much for all your time and help
I'm going to edit the post to publish what the issue was
 
don't edit the question. post an answer
and it should have been obvious from the start: your commits always had the second-last commit as parent and the remote commits are the unmodified commits
 

« first day (3 days earlier)