Scanning a file system path for all version control remote repository urls
Just thought I’d share a PHP shell script to scan a file system path, search for all .git/.svn directories recursively, and collect a unique list of all remote repository URLs. It uses “svn info” or “git remote” to get the repository URL path.
I put this PHP in a file called “scan-for-version-control.php”, and run it by typing:
It created a file in the current working directory: repo_list.txt containing stuff like..