diff options
| author | Christian Cleberg <[email protected]> | 2025-11-11 21:25:46 -0600 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2025-11-11 21:25:46 -0600 |
| commit | ce7749abd0114d836d116ecbeb001d0a3827be3b (patch) | |
| tree | fa74563f278197e81e8928aa322d132013b958d5 /content/blog/2021-03-19-clone-github-repos.org | |
| parent | af67e996dc93ade1acd4eed47d25da55c0c63b50 (diff) | |
| download | cleberg.net-ce7749abd0114d836d116ecbeb001d0a3827be3b.tar.gz cleberg.net-ce7749abd0114d836d116ecbeb001d0a3827be3b.tar.bz2 cleberg.net-ce7749abd0114d836d116ecbeb001d0a3827be3b.zip | |
fix grammar in 2021 posts
Diffstat (limited to 'content/blog/2021-03-19-clone-github-repos.org')
| -rw-r--r-- | content/blog/2021-03-19-clone-github-repos.org | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/content/blog/2021-03-19-clone-github-repos.org b/content/blog/2021-03-19-clone-github-repos.org index 02b290f..399e4bc 100644 --- a/content/blog/2021-03-19-clone-github-repos.org +++ b/content/blog/2021-03-19-clone-github-repos.org @@ -5,14 +5,14 @@ * Cloning from GitHub -If you're like me and use a lot of different devices (and sometimes -decide to just wipe your device and start with a new OS), you probably -know the pain of cloning all your old code repositories down to your -local file system. +If you're like me and use a lot of different devices [and sometimes decide to +just wipe your device and start with a new operating system (OS)], you probably know +the pain of cloning all your old code repositories down to your local file +system. -If you're using GitHub, you can easily clone all of your code back down -in just seconds. First, create a bash script. I do so by opening a new -file in =nano=, but you can use =gedit=, =vim=, or something else: +If you're using GitHub, you can easily clone all of your code back down in just +seconds. First, create a bash script. I do so by opening a new file in =nano=, +but you can use =gedit=, =vim=, or something else: #+begin_src sh nano clone_github_repos.sh @@ -44,12 +44,12 @@ Now you can run the script and should see the cloning process begin. * Cloning from Sourcehut -I haven't fully figured out how to directly incorporate Sourcehut's -GraphQL API into a bash script yet, so this one will take two steps. +I haven't fully figured out how to directly incorporate Sourcehut's GraphQL +application programming interface (API) into a bash script yet, so this one will +take two steps. -First, log-in to Sourcehut and go to their -[[https://git.sr.ht/graphql][GraphQL playground for Git]]. Next, paste -the following query into the left box: +First, log-in to Sourcehut and go to their [[https://git.sr.ht/graphql][GraphQL playground for Git]]. Next, +paste the following query into the left box: #+begin_src sh query { @@ -65,10 +65,10 @@ query { } #+end_src -The output on the right side will give you an object of all your -repositories. Just grab that text and remove all the characters such as -quotation marks and curly brackets. You will need a single-line list of -space-separated values for the next step. +The output on the right side will give you an object of all your repositories. +Just grab that text and remove all the characters such as quotation marks and +curly brackets. You will need a single-line list of space-separated values for +the next step. Now let's create the bash script: @@ -76,12 +76,12 @@ Now let's create the bash script: nano clone_sourcehut_repos.sh #+end_src -Next, paste the following bash script in with the list of repositories -you obtained above and replace =your-username= with your username. +Next, paste the following bash script in with the list of repositories you +obtained above and replace =your-username= with your username. -Note that this uses the SSH-based Git cloning method -(e.g. =git@git...=), so you'll need to ensure you have set up Sourcehut -with your SSH key. +Note that this uses the secure shell protocol (SSH)-based Git cloning method +(e.g. =git@git...=), so you'll need to ensure you have set up Sourcehut with +your SSH key. #+begin_src sh repos=(repo1 repo2 repo3) @@ -108,17 +108,17 @@ Now you can run the script and should see the cloning process begin. * Moving Repositories to a New Host -Now that you have all of your code repositories cloned to your local -computer, you may want to change the remote host (e.g., moving from -GitHub to GitLab). To do this, let's create another bash script: +Now that you have all of your code repositories cloned to your local computer, +you may want to change the remote host (e.g., moving from GitHub to GitLab). To +do this, let's create another bash script: #+begin_src sh nano change_remote_urls.sh #+end_src -Past the following information and be sure to change the URL information -to whichever host you are moving to. For this example, I am looping -through all of my cloned GitHub directories and changing them to +Past the following information and be sure to change the URL (uniform resource +locator) information to whichever host you are moving to. For this example, I am +looping through all of my cloned GitHub directories and changing them to Sourcehut (e.g. =<YOUR_NEW_REMOTE_URL>= -> [email protected]:~myusername=). #+begin_src sh |
