1

still learning how to use git.

i added changes to the files from the last commit. Then i ran the git commit --amend --no-edit command, which was a mistake.

After trying to push changes, it said I had a merge conflict.

I resolved the merge conflict (my repository is still very small, so it wasn't very confusing). I just don't understand what happened to the repo.

Can someone explain what happened?

knittl
  • 246,190
  • 53
  • 318
  • 364
  • You added stuff to the latest commit, so that it is no longer the same commit as the latest upstream commit. – tripleee Dec 18 '22 at 08:02
  • If it's just your private repo, `push -f` will overwrite the upstream repo with your changes. This is potentially dangerous if you are not the only user of the repo, as it creates conflicts for every other checkout of the repo. – tripleee Dec 18 '22 at 08:03

0 Answers0