|
1 | | -# python4 |
| 1 | +# python4 #Hacktoberfest |
| 2 | + |
| 3 | + |
| 4 | +## Steps to follow :scroll: |
| 5 | + |
| 6 | +### 0. Star The Repository :star2: |
| 7 | + |
| 8 | +Star the repository by pressing the topmost-right button to start your wonderful journey. |
| 9 | + |
| 10 | +### 1. Fork it :fork_and_knife: |
| 11 | + |
| 12 | +You can get your own fork/copy of [Python4](https://github.com/Coderich-Community/python4) by using the <a href="https://github.com//Coderich-Community/python4/fork"><kbd><b>Fork</b></kbd></a> button. |
| 13 | + |
| 14 | + |
| 15 | +### 2. Clone it :busts_in_silhouette: |
| 16 | + |
| 17 | +`NOTE: commands are to be executed on Linux, Mac, and Windows(using Powershell)` |
| 18 | + |
| 19 | +You need to clone or (download) it to local machine using |
| 20 | + |
| 21 | +```sh |
| 22 | +$ git clone https://github.com/Coderich-Community/python4.git |
| 23 | +``` |
| 24 | + |
| 25 | +> This makes a local copy of the repository in your machine. |
| 26 | +Once you have cloned the `Python-Sala` repository in Github, move to that folder first using change directory command on Linux, Mac, and Windows(PowerShell to be used). |
| 27 | + |
| 28 | +```sh |
| 29 | +# This will change directory to a folder python4 |
| 30 | +$ cd python4 |
| 31 | +``` |
| 32 | + |
| 33 | +Move to this folder for all other commands. |
| 34 | + |
| 35 | +### 3. Set it up :arrow_up: |
| 36 | + |
| 37 | +Run the following commands to see that *your local copy* has a reference to *your forked remote repository* in Github :octocat: |
| 38 | + |
| 39 | +```sh |
| 40 | +$ git remote -v |
| 41 | +origin https://github.com/Your_Username/python4.git (fetch) |
| 42 | +origin https://github.com/Your_Username/python4.git (push) |
| 43 | +``` |
| 44 | + |
| 45 | +Now, let's add a reference to the original [Python-4](https://github.com/Coderich-Community/python4) repository using |
| 46 | + |
| 47 | + |
| 48 | +### 4. Sync it :recycle: |
| 49 | + |
| 50 | +Always keep your local copy of the repository updated with the original repository. |
| 51 | +Before making any changes and/or in an appropriate interval, run the following commands *carefully* to update your local repository. |
| 52 | + |
| 53 | +```sh |
| 54 | +# Fetch all remote repositories and delete any deleted remote branches |
| 55 | +$ git fetch --all --prune |
| 56 | +# Switch to `main` branch |
| 57 | +$ git checkout main |
| 58 | +# Reset local `main` branch to match the `upstream` repository's `main` branch |
| 59 | +$ git reset --hard upstream/main |
| 60 | +# Push changes to your forked ` python4` repo |
| 61 | +$ git push origin main |
| 62 | +``` |
| 63 | + |
| 64 | + |
| 65 | +### 5. Create a new branch :bangbang: |
| 66 | + |
| 67 | +Whenever you are going to contribute. Please create a separate branch using command and keep your `main` branch clean (i.e. synced with remote branch). |
| 68 | + |
| 69 | +```sh |
| 70 | +# It will create a new branch with name Branch_Name and switch to branch Folder_Name |
| 71 | +$ git checkout -b BranchName |
| 72 | +``` |
| 73 | + |
| 74 | +Create a separate branch for contribution and try to use the same name of the branch as of folder. |
| 75 | + |
| 76 | +To switch to the desired branch |
| 77 | + |
| 78 | +```sh |
| 79 | +# To switch from one folder to other |
| 80 | +$ git checkout BranchName |
| 81 | +``` |
| 82 | + |
| 83 | +To add the changes to the branch. Use |
| 84 | + |
| 85 | +```sh |
| 86 | +# To add all files to branch Folder_Name |
| 87 | +$ git add . |
| 88 | +``` |
| 89 | + |
| 90 | +Type in a message relevant for the code reviewer using |
| 91 | + |
| 92 | +```sh |
| 93 | +# This message get associated with all files you have changed |
| 94 | +$ git commit -m 'relevant message' |
| 95 | +``` |
| 96 | + |
| 97 | +Now, Push your awesome work to your remote repository using |
| 98 | + |
| 99 | +```sh |
| 100 | +# To push your work to your remote repository |
| 101 | +$ git push -u origin BranchName |
| 102 | +``` |
| 103 | + |
| 104 | +###### *We will do our best to merge as much as possible from everyone. However, time is limited and the merge conflicts are horrible :astonished: <3* |
0 commit comments