1

I have a project on a Git Repo. Our little team use our personal remote repo to work, and now that we have to merge our work in the main remote repo we want to do it in one shot, without showing the passages we got. In syntax, all the little changes that we did until now we want to load them like a big commit without showing the history.

Shubham Khatri
  • 270,417
  • 55
  • 406
  • 400
GDG612
  • 129
  • 1
  • 10

1 Answers1

2

What you want is to Squash and Merge your branch, you can do it in the following manner

git checkout branch-to-merge-into
git merge --squash bugfix
git commit

When you select the Squash and merge option on a pull request on GitHub, the pull request's commits are squashed into a single commit. Instead of seeing all of a contributor's individual commits from a topic branch, the commits are combined into one commit and merged into the default branch. Pull requests with squashed commits are merged using the fast-forward option.

Shubham Khatri
  • 270,417
  • 55
  • 406
  • 400