Last active
May 8, 2023 11:22
-
-
Save koraysels/b2f093f4f6ebc8b01d752bf7f7850e8c to your computer and use it in GitHub Desktop.
Git
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
#!/usr/bin/env bash | |
cd INF101AB | |
while read repo; do | |
git clone "$repo" | |
done < ../INF101AB.txt | |
cd ../INF102AB | |
while read repo; do | |
git clone "$repo" | |
done < ../INF102AB.txt |
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
#!/usr/bin/env bash | |
find INF101AB/. -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} fetch -u origin \; | |
find INF101AB/. -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} reset --hard HEAD \; | |
find INF102AB/. -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} fetch -u origin \; | |
find INF102AB/. -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} reset --hard HEAD \; |
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 | |
#written by koray sels | |
# Define the CSV file | |
csv_file="repos.csv" | |
# Read the CSV file line by line | |
while IFS=',' read -r name url; do | |
# Clone the repository | |
git clone "$url" "$name" | |
done < "$csv_file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment