Wolfgang Kamp - datakamp wrote:
Doing git log origin/master.. shows two more commits then that what I want to send.
I want only send the last commit which the command git show displays.
So what is the way to get only the last commit?
That's not possible because it would leave a gap between the commit that you send and the commits that the server has. (The parent of your commit doesn't exist on the server.)
There are several ways to accomplish what you want, but which one is best depends on what you want to do with those "two more" commits.
You can create a new branch based on origin/master, cherry-pick your wanted commit onto that branch and then push that branch.
Or you can do an interactive rebase to make your current branch become what you want to push. That would imply deleting the "two more" commits, which you may or may not want to do.
Please tell more about those other commits?
//Peter