I accidentally commit my local changes to main branch.
Since there is branch protecting setting on main branch, the commit is failed to push to the remote.
When I try to checkout to the origin/main
, error shows
How can I fix it on SourceTree?
Finally fix it by
Right click on the commit in the latest origin/main
> Reset current branch to this commit > Done