I am trying to rebase but my branch got diverged. It seem to be a common problem. I tried few approaches.
I ran these commands
git checkout master
git fetch origin
git reset --hard origin/master
git checkout feature
git pull origin feature
git rebase master
And then I tried to rebase I got the below issue
On branch feature
Your branch and 'origin/feature' have diverged,
and have 47 and 42 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean
2nd Approach
I also tried to delete the feature and master branch. And fetch the latest of both of the branches still the issue persist
git branch -D master
git branch -D feature
git fetch --all
git checkout master
git checkout feature
git rebase master
once I ran the last command and then check the git status I got the same issue as mentioned above
Any help is appreciated