thank you for taking a minute to read this. I only have basic knowledge of git and ran into a problem, i can't get my head around. My remote origin (main) and local (main) diverged. New local changes were commited, but not yet pushed. In the meantime, remote origin also got some additional commits. I tried to merge remote main into local main, but altered some newer local files (older remote files altered newer local) by doing so, and ended up with a merged state I'd rather would not like to push to remote again.
Origin: a---b---c---d
\ \
local : e---f---Merge :(
- Is there a way i can push specific local commits to remote, so i have the missing local commits in remote, without breaking everything?
- Would a rebase have been the better solution in the first place? Any way to cleanup/undo?
Thank you all in advance.