I was working on a feature branch, feature
and pushed a commit. There plenty of changes made on master
and I wanted to pull them on my feature
breanch.
So I switched to my master
branch, pulled the changes, then switched back to feature
. Then I typed in git rebase master
from my feature
branch.
Now I'm getting the following:
On branch feature
Your branch is ahead of 'origin/feature' by 177 commits. (use "git push" to publish your local commits)
Did I just mess up? I don't want to push 177 commits. Is there a way to restart this? Maybe delete my branch and then pull it again?
That's expected after rebasing a branch. Your origin branch is on top of an out-dated version of master. Since you branched off of master, there have been 177 commits to it.
You can use this command to see, for example, the last 10 commits, so you can confirm that it is actually the latest master and not some random commits.
git log --pretty=oneline --graph --decorate --abbrev-commit -10
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.