Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get patch or diff file - Git comparison between branches

I need to get the patch/diff between the development and my feature branch.

How can I get this using git command.

Please consider the branch names be development and test. I need to get the differences from test and development branch.

Edit:

I have followed the steps provided in the below question: Comparing two branches in Git?

The differences are shown in the git terminal only.

How can I save the differences into a patch or diff file?

like image 627
Venkat Avatar asked Jul 18 '26 16:07

Venkat


1 Answers

try

git diff development..test > patch_name.patch

this will create the patch. apply the patch wherever you want.

like image 162
Saurabh Mishra Avatar answered Jul 20 '26 12:07

Saurabh Mishra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!