DEV Community

loading...
Cover image for How to make your cloned Github repo as your Exercism workspace

How to make your cloned Github repo as your Exercism workspace

itshally profile image Hally ・2 min read

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.

Alt Text

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. Alt Text

Step 2

Once you're done, clone your Github repo to your machine.

git clone https://github.com/<your-username>/<your-repo-name>.git
Enter fullscreen mode Exit fullscreen mode

Done cloning? Alright, let's go to the 3rd step!

Alt Text

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>
Enter fullscreen mode Exit fullscreen mode

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>
Enter fullscreen mode Exit fullscreen mode

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>"
Enter fullscreen mode Exit fullscreen mode

Step 5

Make sure that you'll see this line on your command prompt:

You have configured the Exercism command-line client:
Enter fullscreen mode Exit fullscreen mode

And make sure that on the Workspace line displays your new directory.

Alt Text

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Alt Text

Source

How To Setup Exercism CLI To Use Your Own Github Repository by Jim Lynch

Discussion (0)

Forem Open with the Forem app