I have two servers. One for development and one for production. Both are in Gitlab. I work alone and now I have messed up my git origin.
In development server:
- I created a new branch and made some changes with commit.No push
- Then in the same branch I made some other changes with another commit.No push
- Last in the same branch I made some other changes with another commit.
But I made a serious mistake. After third commit I pushed and merged with origin. This was wrong because I wanted only the last commit to merge with origin. All other was testing. I though that I can work these in parallel but probably I did it with wrong way.
Now when I try in production server to pull the changes I get all three commits.
In production server I have a branch called "right-branch" which everything is ok. What I want is to clone this branch to origin master and pull origin to development server so I can start again. How can I do that?