Created
October 13, 2018 15:34
-
-
Save ggirtsou/708b9ef78ce69ab55e5c9df6614b28fb to your computer and use it in GitHub Desktop.
A bash script I wrote to set up local directories as git repos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| set -x | |
| set -e | |
| repos=(ai-labs cloud-backup cloud-cli cloud-compute cloud-configuration cloud-container-registry cloud-dashboard cloud-database cloud-dns cloud-identity cloud-key-management cloud-load-balancer cloud-memory-db cloud-networking cloud-nosql-db cloud-orchestrator cloud-persistent-volume cloud-protect cloud-pubsub cloud-rdbms-db cloud-search-engine cloud-storage cloud-time-series-db code-build monitoring-agent monitoring-aggregation monitoring-alerting monitoring-anomaly-detection monitoring-collection monitoring-processing monitoring-visualisation video-conference) | |
| for repo in "${repos[@]}" | |
| do | |
| cd $repo && \ | |
| git init && \ | |
| git remote add origin git@git.byteslice.co.uk:/srv/git/$repo.git ; \ | |
| git add . ; \ | |
| git commit -m "Initial commit" ; \ | |
| git push -u origin master ; \ | |
| cd ../ | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment