Stomping a local git branch with the remote

When somebody rebases their PR, my local copy of that branch gets out of sync:

➜  keel git:(fix-paused-events) git status
On branch fix-paused-events
Your branch and 'luispollo/fix-paused-events' have diverged,
and have 8 and 16 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

I just want my local copy to reflect the remote one.

I created a “stomp” alias that resets my local branch with the upstream:

    stomp = !git reset $(git status -sb | cut -d'.' -f4 | awk '{print 
$1}') --hard

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s