11

https://github.com/trybeee/GitStats

I already have all of these,Python (>= 2.4.4) (python3 is not supported),Git (>= 1.5.2.4) ,Gnuplot (>= 4.0.0),and a git repository (bare clone will work as well). And I also cloned the gitstats repository.

According to the tutorial, I should run $ ./git-stats /mnt/src/git/project ~/public_html/project. This looks like basing on Linux system, but I'm using W7.

The path of my repository is C/Users/XX/.git/refs/remotes/orgin/firstbranch.

Here are my questions. Where should I run the codes? Should I run them in git bash?

After I typed git-stats C/Users/XX/.git/refs/remotes/orgin/firstbranch public_html/project in git bash.
It showed:
sh.exe": git-stats: command not found

If I go to the file of gitstats ,open git bash and run the codes, it says "No such file or directory".

I have no idea about how to use gitstats. It seems too simple to be discussed for most of people, so I can't find a lot of article about it.

Please help! Thanks!!

Noctis
  • 11,507
  • 3
  • 43
  • 82
fuiiii
  • 1,359
  • 3
  • 17
  • 33

1 Answers1

9
  1. On Windows use python git-stats instead of just git-stats. You may also create a git-stats.cmd file with this only line: @call python D:\Path\To\GitStats\git-stats %*

  2. You may use ordinary Windows paths with backslashes. You also don't have /mnt on Windows.

  3. Point to your repository root, where the .git folder is, not to a branch.

So you are going to invoke the following command (assuming you are in the GitStats directory and python is on your PATH):

python git-stats C:\Users\XX\ C:\Users\XX-stats

cmd shell

utapyngo
  • 6,946
  • 3
  • 44
  • 65
  • I typed “python” in cmd.exe and it showed like this,http://i.imgur.com/kEKri.png. So I think python is on my PATH. I opened the GitStats file, right clicked the mouse, and chose git bash. After I entered "python git-stats C:\Users\XX\ C:\Users\XX-stats", it said "sh:python:command not found" Which part was wrong? Thanks a lot! – fuiiii Dec 29 '12 at 16:55
  • Why *git bash*? Just run *cmd* in that directory. – utapyngo Dec 31 '12 at 03:15
  • My reputation is not high enough to vote, sorry. I have another question. The stats I got from gitstats was not accurate. I deleted a project which was about 100 lines of code, but the gitstats showed 1020 lines of code was removed. And the total lines of code are also too much to be true. – fuiiii Jan 01 '13 at 03:10