back to top
Mentor
Sunday, November 17, 2013

How to Contribute to the Website Code Repository

Github How to

REFERENCE

How to Fork a Repo
Git CheatSheet

================================================

SETTING UP THE GITHUB REPOSITORY

  1. Go to https://github.com/alexiswolfish/frc2590-website
  2. Click "Fork" in the top right.

    - This creates your own unique instance of the repository
    unique to you that stores all of your changes.

-----------------------------------------------
If you are using the Github for Windows Client.

  1. Click tools/options

    - Set Default Storage Directory to somewhere you can save to
    - Select "Git Bash" as the default shell

  2. Open Github for Windows and click on your face under the word "Github"

    - Navigate to yourAccountName/frc2590-website
    - Click clone repository, on the right.
    -If this doesn't work, follow the Git Bash directions below.

  3. Go to local -> repostitories on the left and click the little arrow next to frc2590-website. Click the little gear -> open a shell here

-----------------------------------------------
If you are using Git Bash (or the terminal on macOSX)

  1. Open Git Bash (downloaded with git) + Navigate to the directory you would like to put the repository in

    - type "ls" to see where you are, and "cd directoryName" to open a folder

  2. type  git clone https://github.com/yourUserName/frc2590-website.git

    - this downloads all the files from your forked repository to your computer

  3. type cd frc2590-website


if the above doesn't work, you installed Git on your C drive and can't get at it. Reinstall on H drive
------------------------------------------------
Errybody (also never include the quotes in a terminal command)

  1. If you are at school, type git config http.sslVerify false into the git bash.

    - make sure you are inside the frc2590-website dir by typing "ls"

  2. type  git remote add upstream https://github.com/alexiswolfish/frc2590-website.git

================================================

DAILY GIT

Before you start working

  1. If you made any uncommited changes, create a commit in the top left corner. Make sure to add a message, and then press "Sync"

    - If you are a terminal diehard, type "git add folder/filename" for every file you have changed.
    - or "git add -A"
    - type "git commit -m "ur durr describing the changes I made briefly""
    - include the quotes in that one after m
    - type "git push origin master"

  2. Pull Changes from me (Use the Git Bash Terminal)

    - type "git pull upstream master"
    - or "git fetch upstream master" if you know what you are doing
    - if you get the "fatal unable to access SSL certificate error" on the school computers type

    git config http.sslVerify false
  3. If it says you have a Merge Conflict

    - follow the instructions to use KDiff to settle merge conflicts in the README on the git
    - Alternatively, google a way that confuses you less
    - or just open up the file and delete the conflicts in Notepad++

  4. DO step 1.) again.
  5. Open up your files on your local computer in Notepad++, or your text editor of choice, and hack away to your heart's content.
  6. When you are done, do step 1.) again.
  7.  go to YOUR repository on github.com and press the little green pull request arrow, so everyone recieves your changes