Write a bash one-liner to extract a list of developers from a git repository for the last 3 months.

Here’s a bash one-liner that will extract a list of developers from a Git repository for the last 3 months:

git log --since='3 months ago' --pretty=format:'%an' | sort | uniq

Explanation:

  • git log: This command shows the commit history of the repository.
  • --since='3 months ago': This option limits the log output to commits made in the last 3 months.
  • --pretty=format:'%an': This option specifies the format for each log entry. The %an placeholder prints the name of the author of each commit.
  • sort | uniq: These commands sort the list of authors and remove duplicates, respectively, to show only unique names.

ChatGPT of course.

Next - Previous