Answers for "your branch is ahead of 'origin/master' by 7 commits"

2

Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) nothing to commit, working tree clean

git push origin master
Posted by: Guest on May-18-2021
2

your branch is ahead of 'origin/main' by 4 commits

Use these 4 simple commands

Step 1 : git checkout <branch_name>

This is obvious to go into that branch.

Step 2 : git pull -s recursive -X theirs

Take remote branch changes and replace with their changes if conflict arise. Here if you do git status you will get something like this your branch is ahead of 'origin/main' by 4 commits.

Step 3 : git reset --hard origin/<branch_name>

Step 4 : git fetch

Hard reset your branch.

Enjoy.
Posted by: Guest on April-10-2022

Code answers related to "your branch is ahead of 'origin/master' by 7 commits"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language