You slice and dice your files in a git repo like a pro and accidentally commit a binary file. It happened to you as well, don’t pretend it didn’t.
Sooner or later you recognizes this file shouldn’t be there, it is clogging your git repo for no reason. OK, you delete the file and commit. But the repo size doesn’t get any smaller. Hm…

Continue reading

Nothing bad in knowing how many lines of code or text out there in your repo. You don’t even need your VCS to convey this analytics. All you need is git, grep and wc.

# count lines in .py and .robot files in /nuage-cats dir of the repo
$ git ls-files nuage-cats/ | grep -E ".*(py|robot)" | xargs wc -l
       0 nuage-cats/robot_lib/__init__.py
     817 nuage-cats/robot_lib/lib/NuageQoS.py
     409 nuage-cats/robot_lib/lib/NuageVCIN.py
    1841 nuage-cats/robot_lib/lib/NuageVNS.py
    2964 nuage-cats/robot_lib/lib/NuageVSD.py
    # OMITTED
      26 nuage-cats/test_suites/0910_fail_bridges_kvm_vms/0910_fail_bridges_kvm_vms.robot
   13636 total

Continue reading

Author's picture

Roman Dodin

Eagerness to learn & passion to share

Network Automation @ Nokia

Netherlands