Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.4k points)

Here's what I did on my supposed-to-be-stable branch...

% git rebase master

First, rewinding head to replay your work on top of it...

Fast-forwarded alpha-0.3.0 to master.

% git status

# On branch alpha-0.3.0

# Your branch is ahead of 'origin/alpha-0.3.0' by 53 commits.

#

nothing to commit (working directory clean)

% git push

Fetching remote heads...

  refs/

  refs/heads/

  refs/tags/

  refs/remotes/

'refs/heads/master': up-to-date

updating 'refs/heads/alpha-0.3.0'

  from cc4b63bebb6e6dd04407f8788938244b78c50285

  to   83c9191dea88d146400853af5eb7555f252001b0

    done

'refs/heads/unstable': up-to-date

Updating remote server info

That was all a mistake as I later realized. I'd like to undo this entire process and revert the alpha-0.3.0 branch back to what it was.

What should I do?

1 Answer

0 votes
by (27.5k points)

These commands should do the magic

$ git checkout alpha-0.3.0

$ git reset --hard cc4b63bebb6

$ git push origin +alpha-0.3.0

Browse Categories

...