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
  • 14,023
  • 6
  • 43
  • 67
CodeMonkey
  • 2,265
  • 9
  • 48
  • 94

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
  • 119,907
  • 13
  • 134
  • 226