Question: I had a master branch. And I started to work on a feature on this branch (I forgot to create separate branch and to play on this branch). Before I came to the end of feature implementation, I had a dozen on commits to master with dummy names etc... And now I would like to push this feature to my master origin. But I don't want to push whole commits history. Is there a way to "rollback" intermediate from git log?

Answer: 
Since you have 12 commits it will probably be fastest to do 

```
git reset --soft @{u}
git commit -m "YOUR COMMIT MESSAGE"
git push

```

This will squash an arbitrary number of commits without you having to do anything on a per-commit basis.
Consider `git rebase` with the squash feature. See the [manpage](http://git-scm.com/docs/git-rebase).