nass
nass

Reputation: 347

Git: working after pull request from master branch

I made a mistake. I created a pull request that's currently in review from my fork from master branch. Review can take up to several weeks (public open source project) and I want to work on other feature for which I would like to create separate pull request. Now when I create a new branch it is based on my master branch and has changes from the first pull request so they will go with the new pull request (I guess). How I can recover from that situation?

I've started working with git just a several weeks ago.

Upvotes: 1

Views: 60

Answers (1)

Bhavin Poojara
Bhavin Poojara

Reputation: 71

One thing you can do is to run git command : git reset --hard "SHA-1 of the previous state". It will bring you git code to the state prior to git pull.

you can find "SHA-1 of the previous state" by running command : git-reflog

Then just create new branch from that state and work on new feature in new branch.

Upvotes: 1

Related Questions