2

If i open up tig with another branch:

tig otherBranch

Is it possible to navigate to the tree view find a file that I want and check it out to my current branch?

Allan Hortle
  • 2,435
  • 2
  • 20
  • 22

1 Answers1

6

Yes, you have to add a user-defined command in ~/.tigrc, for example:

bind generic ^F !?git checkout %(commit) %(file)

Then open tig otherBranch, press t to go to the tree view, navigate to the file and press Ctrl-F.

Jonas Fonseca
  • 1,811
  • 15
  • 15
  • Note that the latest version of tig requires the format "" instead of ^F. (which is mentioned as a warning on starting up tig, and the binding is ignored if in the wrong format) – TamaMcGlinn Jun 17 '17 at 12:18
  • tig v. 2.5.4: `tig warning: ~/.tigrc:47: Control key mapping must now use instead of ^F` – d9k Mar 16 '23 at 09:45