Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hg command to get the file content without switching branch

In HG, is there any command such that i can get the file content of the file from another branch without switching/checkout to the particular branch?

like image 400
Bala Sundar Avatar asked Nov 23 '25 12:11

Bala Sundar


1 Answers

If you are using TortoiseHG, you can use the "save at revision" command to do this.

Steps:

  • Run Tortoise Workbench

  • Find the changeset in history which has the file revision you want (could be in any branch)

    • Say its changeset #abcd1234
  • Right click on the specific file in the file list for that changeset

  • Select "Save at revision..." and tell it where to put the file.

  • The file would typically be named [email protected] so that you don't mix it up with the current version.

like image 58
StayOnTarget Avatar answered Nov 25 '25 10:11

StayOnTarget



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!