I have been working on a git repository and have been pushing my local changes to a remote server all the time... up until recently. When I do a git push, it says that everything is up-to-date. In reality, I'm already 3 commits ahead of the remote version and it's not getting my changes.
I have tried the git log -1, git reset --hard solution posted on various places, but that doesn't solve anything. Do I need to change that number to reflect the number of commits that I am ahead?
Say I have 5 commits, for brevetys sake named 1 to 5. My local version is at 5, the remote version is at 2. Gitk shows my MASTER at commit 5 and remotes/origin/master at commit 2. Do I need to git reset my local version to 2 (or 3, the first commit that was not pushed to remote)? What will happen to my changes? The git documentation says that --hard will discard any changes, will that mean that they will be lost completely? I would like to keep the commit history of these 3 commits, as there were quite some changes made.