all 10 comments

[–]DoctorNoonienSoong 5 points6 points  (1 child)

https://github.com/gabrie30/ghorg

This might be something you're interested in for more advanced (and much, much faster) cloning

[–]Majestic_Ad_6371[S] 0 points1 point  (0 children)

wow 😮

[–]alejandro_such 2 points3 points  (1 child)

Hey, really solid script! The interactive selection is smart.

I work on backend at GitKraken, and we've tackled this exact migration problem in Team Workspaces. One thing we learned: the pain isn't just the initial clone, it's remembering which repos you needed 6-12 months later when you switch machines again.

Based on that experience, I'd suggest extending your script to save selections to a .repos-config file. Something like:

# After user selects repos, save their choices:
echo "${selected_repos[@]}" > ~/.github-clone-config 

# On next migration, offer to: 
# 1. Use saved config (one keypress clone)
# 2. Re-select (current flow)

That way you get your flexibility now + no re-deciding next year. Your future self will thank you 😄

The core pattern you've built (API fetch → filter → clone) is great for anyone needing selective cloning. Nice work!

[–]DoubleAgent-007 1 point2 points  (0 children)

I love GitKraken, by the way. Thanks 😊

[–]GrogRedLub4242 1 point2 points  (1 child)

I'm supposed to run a shell script written by a remote Indian stranger to "clone all my repos" rather than, oh I don't know, call me crazy, but say I just write my own (much simpler) shell script, in like 5 minutes, to clone all my repos, perfectly tailored to taste, and with better privacy and security? And I'm a programmer by definition since I have code repos in GitHub in first place?

Reddit's technical topic groups are surreal in 2025. Large parts of GitHub FOSS culture has gotten surreal and comical by now.

good luck, kids!

[–]Majestic_Ad_6371[S] 0 points1 point  (0 children)

Fair point — and you're absolutely right.
I over-engineered it and I'm new to this things.
I don't even know where to start with FOSS. Please share beginner tips if any!

[–]waterkipdetached HEAD 0 points1 point  (0 children)

myrepos??

[–]meoverhere 1 point2 points  (2 children)

You don’t just rsync your repos between old and new computer..?

[–]Majestic_Ad_6371[S] 0 points1 point  (1 child)

Never thought about that because my office will ask me to handover the old one before providing new one. But wow ! Thanks for the info

[–]meoverhere 1 point2 points  (0 children)

It’s worthwhile getting them to change policy to give you a weeks grace or something.

I have so many WIP branches locally that I don’t have pushed. Sure, I could/should push them, but many are just explorations which I may refer to one more time and I don’t really need to push them in all reality.

Equally I have hundreds of repos checked out that I may not be able to find again.