0

Well, situation is that I need to know how LoC (lines of code) I have written so far. It's easy because GitHub.com has 'Stats & Graphs' - 'Impact' section where it's all clearly visible.

The problem is that I need to add, lets say, jQuery. I'm not author of jQuery, as you may notice. (:

It would be unfair to myself if I git add jQuery as my own code, isn't it? So I'm looking for a way to get needed files to GitHub.com (as usual), only without getting LoCs++ about them.

Is it possible? Thanks in an advice!

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
daGrevis
  • 21,014
  • 37
  • 100
  • 139

2 Answers2

1

Temporarily change your username in Git before you commit, and the commit will be listed with a different name. GitHub will count those LoC separately.

erjiang
  • 44,417
  • 10
  • 64
  • 100
  • With username you meant `git config --global github.user mynameisjohnsmith`? That means that I need to change token as well and, to change the token, I need new account on GitHub.com. Right? Any easier (not painful) way? (: – daGrevis Nov 22 '11 at 20:02
  • You don't need to change the github.user and github.token. Just change the email you commit with. There is a commiter and a author. Make sure the author isn't you. Then everything should be cool. – Simon Gate Nov 22 '11 at 20:19
  • There's no need to mess up your config - you can set the environment variable GIT_COMMITTER_EMAIL (or the same with AUTHOR or NAME as desired), e.g. `GIT_COMMITTER_EMAIL=foo@bar.com git commit` – Cascabel Nov 23 '11 at 02:12
0

Do a subtree. http://book.git-scm.com/5_advanced_branching_and_merging.html#subtree

Simon Gate
  • 582
  • 2
  • 9