8

Using GitX, how do I view the revision history for a single file? (using the command-line interface preferably)

E.g using GitK this is rather simple;

$ gitk app/models/activity.rb
KingCrunch
  • 128,817
  • 21
  • 151
  • 173
GlennR
  • 969
  • 8
  • 6

3 Answers3

12

try

gitx -- app/models/activity.rb

make sure you run the command at the repository root otherwise gitx will appear empty

zdsbs
  • 93
  • 7
rgcb
  • 1,111
  • 1
  • 11
  • 17
2

Use something like @rgcb said but make sure you are at the top level of the repository.

gitx -- app/models/activity.rb

not

gitx -- ./activity.rb
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
ralphinator80
  • 641
  • 5
  • 17
0

Same way, but with gitx instead:

$ gitx app/models/activity.rb

Note that all the commits shown will include the specified file, but the full commit will be shown (i.e., it'll show changes for other files modified in that commit).

mipadi
  • 398,885
  • 90
  • 523
  • 479