|
1 |
| -# python-teach-learn |
2 |
| -This is a repository to teach and learn Python |
| 1 | +# Python teach and learn |
| 2 | + |
| 3 | +This is a repository to teach and learn Python. |
| 4 | + |
| 5 | +If you are a teacher, you can use all the exercises on this repo for your own purpose: |
| 6 | +teach some concept, exams, etc. |
| 7 | + |
| 8 | +As a student take a look to the explanations below. |
| 9 | + |
| 10 | +## Requirements |
| 11 | + |
| 12 | +* Python >= 3.6. |
| 13 | +* Git installed. |
| 14 | +* A GitHub account. |
| 15 | + |
| 16 | +## Repo structure |
| 17 | + |
| 18 | +On master you only have a few files, every exercise is inside his own branch. |
| 19 | + |
| 20 | +Every branch has a name with index + what we learn. |
| 21 | +For example the first branch is `0_hello-world`. |
| 22 | +Also, we have modifications to the main exercise on a branch, example: `0.1_hello-someone`. |
| 23 | +This modifications add more complexity to the main problem like is usually done on [code katas](https://en.wikipedia.org/wiki/Kata#Outside_martial_arts). |
| 24 | + |
| 25 | +> Katas starts with a simple problem and will be more complicated on every step |
| 26 | +
|
| 27 | +## Step by step guide |
| 28 | + |
| 29 | +If you fork this repo, never update the original branches because you could have conflicts in the future. Instead of that, create new branches. |
| 30 | + |
| 31 | +### Step 0: Read it |
| 32 | + |
| 33 | +Yes, this should be your first step, read this README and, of course, we start with 0 not 1. |
| 34 | +If you do not know why, we will see it in the future, be patient. |
| 35 | + |
| 36 | +### Step 1: Fork |
| 37 | + |
| 38 | +You should fork this repo and then start working with it. |
| 39 | +How? We will see a step by step guide with git commands. |
| 40 | + |
| 41 | +If you use another tool like GitHub Desktop take a look to their docs. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +### Step 2: Setup the upstream |
| 46 | + |
| 47 | +This step is required to have the latests updates from the main repo in your forked one. |
| 48 | + |
| 49 | +When you setup this you will be able to: |
| 50 | + |
| 51 | +1. Update the master branch of your forked repo. |
| 52 | +2. Get any new branch created from the main repo. |
| 53 | + |
| 54 | +#### Add upstream remote origin |
| 55 | + |
| 56 | +```shell |
| 57 | +git remote add upstream [email protected]:mrroot5/python-teach-learn.git |
| 58 | +``` |
| 59 | + |
| 60 | +#### Update branches |
| 61 | + |
| 62 | +This could be done with the fetch button on GitHub: |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +Or with a git command: |
| 67 | + |
| 68 | +```shell |
| 69 | +git pull upstream master |
| 70 | +``` |
| 71 | + |
| 72 | +Simply change master for the branch you want. |
| 73 | +On GitHub you must change to a new branch to have the option to fetch it. |
| 74 | + |
| 75 | +#### Update list of branches |
| 76 | + |
| 77 | +I do not know if GitHub have an option to do this so, this is the command: |
| 78 | + |
| 79 | +```shell |
| 80 | +git fetch upstream |
| 81 | +``` |
0 commit comments