2

In both the Github client for Mac OS X and Github on the web, a diff only shows 3 lines of context (lines above and below the change).

Is there any way to show more lines of context in Github?

Nick Volynkin
  • 12,852
  • 6
  • 41
  • 64
CodeMonkey
  • 2,226
  • 8
  • 45
  • 90

1 Answers1

2

If you are using git diff on the command line, the -U option set the amount of contest to use. So for example git diff -U10 file will show the differences between your working version of file and the index version, with 10 lines of context.

If you're using a GUI client it may have a config param buried somewhere in a preferences menu. Unfortunately, there does not appear to be a gitconfig variable to set this.

Chris Dodd
  • 111,130
  • 12
  • 123
  • 212