Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. If you haven’t already, download and install Git: https://git-scm.com/

    1. Git should already be installed on Linux and MacOS.

  2. Windows (Linux and MacOS users skip step): Set line endings.

    1. Check: git config --get core.autocrlf

      1. If it is true or input , you do not need to set anything.

    2. Set: git config --global core.autocrlf [setting] .

      1. --global is optional, and replace [setting] with either true or input

      2. When in doubt, use input

    3. Additional information here: https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_autocrlf

  3. Configure Git with your name and email: https://linuxize.com/post/how-to-configure-git-username-and-email/

    • --global if you want to use it as the default, otherwise it will just be for the current repository.

    • You can use your anonymous GitHub no-reply email.

  4. Go to GitHub and navigate to your copy of the repository, under your account. Do not go to WARG’s copy of the repository!

  5. Click on the green Code button.

  6. In the dropdown, you can copy either the HTTPS or SSH link.

    1. Windows and MacOS: Copy the HTTPS link (although you can copy the SSH link if you desire).

    2. Linux: Copy the SSH link.

      1. If you really want to use HTTPS on Linux, you have to install the Git Credential Manager or create a Personal Access Token on GitHub. How to do this is left as an exercise for the bootcamperyou.

  7. If you’re using the SSH link (HTTPS link users skip this):

    1. If you haven’t already, create a new SSH key and add it to your GitHub account:

      1. https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

      2. If you add a password to your SSH key, you will have to type it in every time you use Git to interact with GitHub (e.g. cloning, pulling, pushing). You can always delete and create a new SSH key if you change your mind later.

      3. https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

  8. Pick a parent directory to clone (download the code) into.

    1. Example: Cloning in C:\Users\Username\ will create a folder and then populate it: C:\Users\Username\autonomy-bootcamp-2023\[bootcamp stufffiles]

  9. Open the console in the parent directory.

    1. Windows: Command prompt or Powershell.

    2. Linux and MacOS: Terminal.

  10. RunClone the repository: git clone [link you copied] , where [link you copied] is the link you copied in step 56.

    1. HTTPS link users: You will be prompted to log into your GitHub account. Do so.

  11. Done!

...

  1. If you haven’t already, activate the virtual environment:

    1. Windows command prompt: venv\Scripts\activate.bat

    2. Windows Powershell: .\venv\Scripts\Activate.ps1

    3. Linux and MacOS: source venv/bin/activate

  2. You should now see (venv) in the prompt line.

  3. Code away! Run the tests! Please try to follow our style guide: Python Style GuideConvention

    1. Ask questions if you need help!

  4. Make a commit:

    1. Check which files have changed: git status

    2. Run: git add [files you changed] , where [files you changed] are the files you want to add to the commit.

      1. Use git add . if you want to add all of them (the dot means wildcard in Git).

    3. Run: git commit -m "Your commit message"

    4. When you’re ready to push your latest commits to GitHub: git push

      1. No harm in doing this after every commit.

  5. When you’re done, make sure to either close the terminal or run:

    1. Windows command prompt: venv\Scripts\deactivate.bat

    2. Everything else: deactivate

    3. This is important to avoid going to a different project and then accidentally polluting your current project’s virtual environment.

...