Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.4k points)
I have a git repository with multiple branches.

How can I know which branches are already merged into the master branch?

1 Answer

0 votes
by (27.5k points)

Step 1: First, switch to your master branch

$ git checkout master

Step 2: Now, take all the commits from the bugfix branch and merges it with your current branch

$ git merge --squash bugfix

Step 3: Create a single commit from the merged changes

$ git commit

You must be wondering there should be an -m parameter, well omitting the -m parameter lets you modify a draft commit message containing every message from your squashed commits before finalizing your commit.

Browse Categories

...