How to merge with squash in Git?

0 votes

Hi Guys,

I have two branches in my local Git repo. Now I want to merge these two branches. But I don't want to merge the logs as well.

I searched in google and find that git squash can be used. But I don't know how to use. Can anyone help me?

May 13 in Git & GitHub by akhtar
• 11,250 points
32 views

1 answer to this question.

0 votes

Hi@akhtar,

If you want to merge your data between branches, you can use git merge. But git merge will also copy the logs from another merge. But if you want only data you can use squash. Use the below given command

$ git merge --squash branch_name

Hope this will help.

answered May 13 by MD
• 24,500 points

Related Questions In Git & GitHub

0 votes
1 answer

How to do a re-merge into another branch in git

Seems like you want to rebase your ...READ MORE

answered May 7, 2018 in Git & GitHub by DareDev
• 6,850 points
432 views
0 votes
1 answer

How to give a file execute mode permissions in Git?

You can easily do this in one ...READ MORE

answered Aug 6, 2018 in Git & GitHub by Sophie may
• 9,940 points
2,880 views
0 votes
1 answer

How to add a remote git repository in Jenkins

Follow these steps: Step 1 Go to Manage ...READ MORE

answered May 23, 2019 in Git & GitHub by Alok
192 views
0 votes
0 answers

How to use p4merge tool in Git & GitHub?

Hi, Can someone tell me, how to use ...READ MORE

Jan 31 in Git & GitHub by akhtar
• 11,250 points
46 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
498 views
0 votes
1 answer
0 votes
1 answer

How merge works in Git & GitHub!!!??

Hi@Hasid, In Git & GitHub merge concept comes ...READ MORE

answered Jan 31 in Git & GitHub by MD
• 24,500 points
37 views
0 votes
1 answer

How to roll back to previous version in Git?

Hi@akhtar, You can roll back your previous version ...READ MORE

answered Apr 29 in Git & GitHub by MD
• 24,500 points
29 views