Skip to content

Latest commit

 

History

History
76 lines (59 loc) · 4.73 KB

CONTRIBUTING.md

File metadata and controls

76 lines (59 loc) · 4.73 KB

Getting Started with TERMINALMONOPOLY

Step 0: what you'll need

  • Code editor of your choice (recommended: VS Code)
  • Python installed in your system (minimum ver. Python 3.10)
  • Git installed on your system
  • The code documentation at DOCUMENTATION.md

Step 1: forking a repository

fork

fork2

  • Create a name for your fork (default is usually fine) and add a description
  • Create fork

uptodate

  • Ensure the newly created branch is up to date with ufosc/TERMINALMONOPOLY:main
  • If not, press "sync fork"

Step 2: cloning the fork

vscode1 Different code editors have different features, but most have Github integrations or extensions you can work with. If not, you can always use the command line commands listed here.

vscode2

  • Navigate to a directory in your file system where you want to save everything. cd to switch directories
  • Clone git repository using code editor feature or in the command line: git clone
  • Once cloned, git pull using code editor or in the command line: git pull (no parameters). This ensures you are up to date.

vscode3

Step 3: working on a branch

Create a new branch with a descriptive (but short) title regarding what you're working on

  • Use code editor feature or command line: git branch
  • Additionally, you can always use git branch to view all your local branches
  • To switch to your newly made branch, use git checkout Once you're working in the new branch, you can make new changes locally without messing up your main branch

You're all set! Happy coding!

Ready to submit your changes? How to submit a Pull Request

image

Step 1: saving your files and staging

  • Review all changed files and save them locally (ctrl+S)
  • Run git add . to add all changed files to staging area. Alternatively, use git add filename1 filename2 filenameN ... to add only specific files.

image

Step 2: commit

There are multiple ways to use the commit command.

  • In the command line, use git commit -m where the message parameter is less than 50 characters, and briefly describes the commit Commit messages should be descriptive and tell the history of the changes. What is depicted here is NOT a good commit name. See here for additional reading: [https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/]
  • In vscode, you may also use the box in the top left to create a commit message, and you may commit with the checkmark.

vscode6

Step 3: publish branch

  • If this is a new branch, publish it using the button
  • Publishing should automatically push, but if not move to step 4.

vscode7

Step 4: push

  • In the command line, git push Pushing sends your local changes to the remote (your fork, on github.com). In the image, everything is up-to-date because of step 3.

fork3

Step 5: contribute

  • On your own fork, you may see "compare and pull request" green button: you will do mini-pull request where you compare the previous code you have to your new code and save the new changes.
  • Once you've updated your fork, you can press the contribute button to create a pull request for the main branch.
  • Write a thorough and accurate description of your changes.
  • If you were working on an issue #, add "fixes #N" where N is the issue number. Github should help auto populate this as well. See the following [https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue]

That's it! Your code will be reviewed by a tech lead and if approved, merged into the main branch. Congrats on your contribution!