0

I have around 105 commits on my master branch and 538 commits on my front-end branch and I feel like it happened because I forced pushed when git was throwing errors every time I push. is there any way we could potentially combine all the commits and show the sum of commits numbers on my master branch. for ie. I have 105 commits on the master branch and 539 commits on my frontend branch.I want my master branch to show that 644 commits has been made!"

  • 2
    Does this answer your question? [What is the best (and safest) way to merge a Git branch into master?](https://stackoverflow.com/questions/5601931/what-is-the-best-and-safest-way-to-merge-a-git-branch-into-master) – ndogac Jul 30 '21 at 17:53

1 Answers1

0

Edited: The image is to visualize the commits. Assume that master has 3 commits (A, B, C) and front-end 2 commits (D, E + A because front-end was created by master)

1- Current state

2- Rebase your front-end branch to be updated with master:

git checkout front-end
git rebase master  //Pray for no conflicts!!!
// If there are conflicts resolve it one by one.

3- Then merge (with fast-forward) to master:

git checkout master
git merge front-end

Ready, your master branch will be lineal with his own changes first, and after the changes form front-end.

enter image description here