Skip to content

Commit 35c05cb

Browse files
authored
Add scripts for searching files and counting commits q
1 parent f6333cb commit 35c05cb

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

pages/git/index.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,6 +1504,28 @@ <h2>list all contributor from the repository</h2>
15041504
# will filter out even empty email from example:
15051505
# Name Surname <>
15061506
</script>
1507+
<h2>search files by path - return commits where changes</h2>
1508+
<script type="editor" data-lang="sh">
1509+
1510+
# more info
1511+
git log --name-status --date=iso \
1512+
--format="COMMIT %H | %ad | %an | %s" \
1513+
-- \
1514+
test/zod/simplifyErrors.parallel.test.ts \
1515+
docker/docker-compose.sh
1516+
1517+
# find commits where this file was modifie - more compact
1518+
git log --pretty=format:"%H %ad %s" --date=iso \
1519+
-- \
1520+
test/zod/simplifyErrors.parallel.test.ts \
1521+
docker/docker-compose.sh
1522+
1523+
# just count
1524+
git rev-list --count HEAD -- \
1525+
test/zod/simplifyErrors.parallel.test.ts \
1526+
docker/docker-compose.sh
1527+
1528+
</script>
15071529
<h2>
15081530
find big files, from <a href="https://stackoverflow.com/a/42544963">https://stackoverflow.com/a/42544963</a>
15091531
</h2>

0 commit comments

Comments
 (0)