1
I am harduser and experienced programmer, but a problem has occurred: to a private repository on Github, with only one user committing, eventually when sending code I receive notice that it has been denied, and that I need to pull before. When this is done, git warns extremely stupid errors, and when "resolve", the github interface displays the following:
Merge branch 'master' of github.com:fititnt/repositorio
Conflicts:
pasta/pasta2/arquivo.js
master
fititnt authored 11 minutes ago
Showing 0 changed files with 0 additions and 0 deletions.
Relevant points
- Only one user, from only one computer (Ubuntu 12.04), using command line and
git gui
andgitk
- Apparently, there is no change of file permissions when this error occurs
- Never use
--force
,git rebase
andgit commit --amend
. - git version 1.7.9.5
- The mistake doesn’t happen at all times. It usually happens when I’m several hours off the computer.
Temporary contour solution
Outline solution I use when this occurs is to save all changes out of git, use the command git reset --hard HEAD~1
that effectively destroys any reference to the commit that was done locally, give pull, reapply the changes and then successfully commit without error. But this is annoying to do at least once every day or two.
I’m suspicious that this may be a Github or git bug.
I changed the question to make it explicit that
git rebase
orgit commit --amend
are used. I will have to wait for the error to repeat to test thegit fetch
->git log origin/branch
->git log branch
.– Emerson Rocha