-2

Let's say I want to see all git changes from my repository. What I do is to execute the following command on the windows console:

git log --oneline --decorate

So I can see the complete history on the console.
But what if I want to save it in a file, to send it to the client? I know I can capture the output of the console doing some coding, but I think there must be a way to simply save it in a file. Something like git log --oneline --decorate --SaveToFile or something like that How can something like this be done?

musiKk
  • 14,751
  • 4
  • 55
  • 82
Mateus Viccari
  • 7,389
  • 14
  • 65
  • 101

1 Answers1

5

Posting comment as answer:

You can use simple stream redirection to achieve it.

git log --oneline --decorate > file.txt

Ryan J
  • 8,275
  • 3
  • 25
  • 28
  • 1
    use also --no-pager to get the complete output http://stackoverflow.com/a/10330711/1136458 – lib Nov 02 '16 at 13:08