Some people will say that you don't need to do it because your Exercism solutions are already posted on your Exercism profile. However, some still want to push it to their Github repo and I am among them.
Note:
These steps can be applied as well if you just want to simply rename, move, or just going to change your Exercism workspace. In other words, if you just want to configure your Exercism workspace then you just only need to follow Step 3 & Step 4. But in this case, we will stick to the topic. Shall we?
Here are the steps:
Step 1
Create a new Github repository for your Exercism solutions if you haven't created one yet.
Step 2
Once you're done, clone your Github repo to your machine.
git clone https://github.com/<your-username>/<your-repo-name>.git
Done cloning? Alright, let's go to the 3rd step!
Step 3
This time, we are going to configure our Exercism and this is the most important part.
Using your Command Prompt, go to the root directory where your Exercism CLI is located. Mine is in the..
C:\Users\hally>
Step 4
Okay patience. Now, to configure your Exercism workspace, you need to run this command line
exercism configure -w=<type-your-new-location-with-your-repo-name>
The -w
is short for --workspace
.
In my situation, I have to move it to another drive.
exercism configure -w="G:/Programming Projects/Github/<cloned-repo-name>"
Step 5
Make sure that you'll see this line on your command prompt:
You have configured the Exercism command-line client:
And make sure that on the Workspace line displays your new directory.
If so, you can now start downloading the exercises and it should be downloaded straight to your cloned repository.
Try to check your Git status:
git status
But after you solved your downloaded challenge and then want to push it now, you can do so.
git add .
git commit -m “adding a solution”
git push
Source
How To Setup Exercism CLI To Use Your Own Github Repository by Jim Lynch
Top comments (0)