I’m just starting out with Git and I’m looking for a way to get the number of revisions a file has undergone.
Right now I’m using the command:
git diff master~(arbitrary number) main.js
How do I know how high I can go with this number? I would also like to obtain the dates for each revision as well.. Thanks!
Try this
for the revisions along with dates. You can pipe this through
wc -lfor the number of revisions. For printing different bits of information, tryand check out the
format:parameter to the--prettyoption.