1

I use git to update my copy of a project when new features are added. Git provides a very nice summary of the changes that have been made, something like this:

intro/matplotlib/matplotlib.rst                             |  266 +++--
intro/numpy/advanced_operations.rst                         |   62 +-
intro/numpy/array_object.rst                                |  630 ++++++----

With this I can also follow the development of the project and it is quite useful. At some point I made some personal changes to the source code of the project, but then I reverted it. Since then, I think, the nice summary disappeared, and instead this line is shown each time I do git pull:

First, rewinding head to replay your work on top of it...

How to revert things and make the summary appear again?

Michele
  • 2,796
  • 2
  • 21
  • 29

1 Answers1

1

The little summary with the statistics is a consequence of the git merge operation, in fact by default it is called with the --stat option (to avoid the stats one can pass the -n or --no-stat option). Since git pull is a git fetch followed by a git merge the stats are shown by default. If you are not seeing them any more probably your are doing a rebase instead of a merge.

So you can

  • modify the .git/config file of your repo and comment the line rebase = true relative to the branch you are interested to. Be aware that this obviously changes the behaviour of the merging process from a rebase to a merge (see here for details)

  • use the command git pull --stat to force the stats to appear when pulling

Community
  • 1
  • 1
Michele
  • 2,796
  • 2
  • 21
  • 29