version control - Git: how is a branch I'm not committing to ahead of origin/master - Stack Overflow:

To see the commits you have in HEAD that are not in origin/master:

git log origin/master..

To blow them away and make your HEAD the same as origin/master:

git reset --hard origin/master


I'm not sure that's ever The Right Way to use git -- or to program so badly that you'd rather blow it all up. But it could be useful if you've changed too much and need to build now. Interesting to know, though.

Labels: