DEV Community

Discussion on: 3 Ways to Backup Your Code (Even If You Don’t Know Git)

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Just a small suggestion: you can rewrite this to have the command directly in the loop.

for repo in $(gh repo list $(whoami); do
   # Loop code here
done
Enter fullscreen mode Exit fullscreen mode

Also using whoami in the assumption that your linux username is the same as your github username :D

Thread Thread
 
0vortex profile image
TED Vortex (Teodor Eugen Duțulescu)

I like the one-line improvement but the username is definitely not a given for a lot of people :D

Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Yep, that's just a suggestion for cases where it's the same; my username is the same everywhere so for me this would work :D