bzh-bzh / cosmolab-site-v2

USC CosmoLab webpages

Home Page:https://cosmolab.usc.edu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cosmolab website

This website is hosted in this staging area: https://usc-cosmolab.github.io/cosmolab-site-v2 and is also linked from usc.cosmolab.edu. Changes made to this repository should be reflected at those links.

Contributing to the website

The following steps are required to edit and use this repository to make changes to our cosmolab website.

If contributing for the first time:

  1. Copy repo link from github:
    • click green code block
    • copy ssh link
  2. Clone to your computer
    • In a terminal, go to the directory/folder you want the repo in
    • type in terminal command:git clone paste-ssh-link-here

Subsequently:

  1. Create a new branch for you to code in
    • git checkout -b branch_name where branch_name is the name of the branch you wish to create
    • Can always call git status inside a git repo/directory to check up on your branch
  2. Make code/file/directory edits
    • For images, copy and paste an image to the cosmolab-site-v2/images directory
  3. Preview your changes with your browser, e.g.
    • firefox index.html
  4. Add your changes
    • git add /path/to/edited/files
  5. Commit your changes
    • git commit -m "Provide a note of what you changed here"
  6. Push your changes to github
    • git push origin branch_name
  7. Last steps! Create a pull request:
    • Go to our github: github.com/usc-cosmolab/cosmolab-site-v2
    • A message at the top of the page should appear, saying "branch_name had recent pushes"
    • Click "Compare & Pull Request"
    • Make sure you are comparing branch_name to base:main
    • Leave a comment and click "Create Pull Request"
  8. Wait on Kris/Vera to accept your PR (pull request)

Summary/Cheat sheet:

There are 5 commands you need to use, listed below.

git clone link-to-repo

git checkout -b branch_name

git add /path/to/file

git commit -m "comment addressing the changes you made"

git push origin branch_name

The logic is: Clone the repo to your machine. Checkout (create) a new working branch. Edit, then Add your changed files. Commit your changes. Push the changes to github. Creat a Pull Request via web interface at the end.

About

USC CosmoLab webpages

https://cosmolab.usc.edu/

License:Other


Languages

Language:HTML 38.3%Language:CSS 30.7%Language:SCSS 23.5%Language:JavaScript 7.5%