Home > database >  Git: How to reset your current branch?
Git: How to reset your current branch?

Time:08-10

I messed up my current branch and have a few unpushed commits.

I've done a git rebase too and it is very messy now.

So I want to start fresh with the branch that is online, how do I go about doing this?

Also, as I mentioned I have unpushed commits on my local so I want them to go as well - will restarting delete all my unpushed commits?

Thank you!

CodePudding user response:

Delete your local branch with git branch -D <branch_name> and then pull it again from your origin

  • Related