/codewars-challenges

Repo for practicing codewars/git

Primary LanguageRuby

Git Practice - Codewars Challenges

The Basic Idea

The codewars.rb file in this repo contains six challenges taken from codewars.com. You'll need to set up an account on codewars to fully benefit from these exercises.

Each challenge, or 'Kata', has an accompanying URL, which should take you to the actual Kata page on codewars.com. That's where you'll be able to test your code, submit your solution, gain 'honor' and increase your rank, etc. The idea here is that you'll write your solutions to these challenges in VS Code for the purpose of practicing git branching, pull requests, merging and resolving conflicts.

Note: The challenges are supposed to be ordered in terms of difficulty, but this might depend on the individual and their experience.

Steps to follow

  • You'll need to pair with another person (or more).
  • One of you will need to fork this repo to your GitHub.
  • All those involved will need to clone the forked repo to their machine.
  • Divide the challenges up among you, so that you're solving different ones (but make sure you save one to work on together at the end!).
  • Make a new branch on your machine that relates to your chosen challenge.
  • Complete your challenge until you've got it working on codewars (copy and past over to the online Kata to test it, or work on it in the Kata and copy back into VS Code). Either way, try to git commit the local file as often as possible.
  • Once you've got the challenge working and you're happy with your solution, push your commits to your branch.
  • Create a pull request to merge your completed branch with the main branch (on your or your partner's forked repo).
  • Respond to your parnter's/partners' pull request(s) when they're done with their challenge(s).
  • Now do the same but this time with all those involved working on the same challenge (you might want to save the most difficult challange for this stage).
  • Now try to merge your branches and resolve conflicts (if they arise).

Make it your own

Once you've forked the repo, you can customise the codewars file to suit your needs - add/delete challanges (or even files) and up the difficulty.

Resources

Git branching (Makers)
More branches
Pull requests
Git conflicts