Git Setup - RobotGirls/FTC-Team-25 GitHub Wiki
- Go to https://github.com and click "Sign up"
- Enter your email address. It's recommended to use your @rocknrollrobots25.com email, but if you prefer to use another email address, just remember which one. You'll need to access this email to receive your account activation link, so pick one you can log into!)
- Create a password
- Read the GitHub Terms of Usage and Privacy Policy. Talk to your parents if you don't understand or have any questions
- Choose the personal plan: "Unlimited public repositories for free"
- You do NOT need to click on the "Help me set up an organization next"
- Answer the "How would you describe your level of programming experience?" question
- Answer the "What do you plan to use GitHub for?" and select "Other" (you can select the other boxes also if they apply)
- Answer the "Which is closest to how you would describe yourself" with "I'm a student"
- GitHub will send you an activation email to the email you supplied earlier with a link to activate the account. Click the URL link in the email that you receive
Not sure what command line is? See Intro to Command Line Interface
- Both
.bashrc
and.bash_profile
set up and customize your command line environment. This is where you can put keyboard shortcuts or path variables-
.bashrc
is run when you start a new bash instance, like when you type/bin/bash
in a terminal (non-login shell)- This file contains things that you need in every shell you open, like aliases, functions, etc. These 'per shell' session items are not inherited from the environment
-
.bash_profile
is executed to when you login (ex. type username and password) via console, either physically at the machine or through SSH (login shell)- This file contains things that only need to be defined once at login time, like PATH, environment variables, startup programs, etc.
- In most cases, you also need the things from
.bashrc
in your login shell. That's why.bash_profile
sources.bashrc
, but.bashrc
doesn't usually source.bash_profile
-
- On OS X, Terminal by default runs a login shell every time. This is a little different than most other systems, but you can configure that in preferences
- Open a terminal window and make a FIRST directory by typing the following:
mkdir ~/Desktop/FIRST
- Change directory (cd) to the FIRST directory
cd ~/Desktop/FIRST
- Clone the java-rnrr/software repository
git clone https://github.com/java-rnrr/software.git
- If you get the following message:
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install
, then either install xcode or download a newer version of GIT.- In System Preferences, click Security & Privacy, then click General. Click the lock and enter your password to make changes. Select App Store under the header “Allow apps downloaded from.” and select "App store and identified developers" 3 ways to install from unidentified developers on macOs sierra
- Change directory into 'software' directory
cd ~/Desktop/FIRST/software
- Copy bashrc and bash_profile into your home directory
cp bashrc ~/.bashrc
cp bash_profile ~/.bash_profile
- Determine your user name
echo $USER
- Edit the ~/.bashrc file by opening the editor vi
vi ~/.bashrc
- Remove the '#' at the beginning of the 'export' line and replace REPLACE_WITH_YOUR_USER_NAME with your user name
SSH keys make it easier to connect to GitHub with providing your username and password every time you need to clone or push to a repo.
Follow GitHub's instructions on how to add a new SSH key
- Go to https://github.com/RobotGirls
- Click on the FtcRobotController repo
- Click on the green "Code" button to open the pulldown menu. Under "Clone", click "SSH". Click on the overlapping double squares to copy the git repo name [email protected]:RobotGirls/FtcRobotController.git
- Open a terminal window on your PC or Mac and change directory (cd) to the FIRST directory
cd ~/Desktop/FIRST
- Clone the FtcRobotController repository
git clone [email protected]:RobotGirls/FtcRobotController.git
- Repeat the same steps for the terkel repo
git clone [email protected]:RobotGirls/terkel.git
- Repeat the same steps for the FTC-Team-25 or FTC-Team-5218 git repo, depending on which team you belong to.
git clone [email protected]:RobotGirls/FTC-Team-25.git
git clone [email protected]:RobotGirls/FTC-Team-5218.git
- Change directory into the FtcRobotController repo
cd FtcRobotController
- Depending on your team assignment, check out your team's road runner branch
git checkout master-25-rr
git checkout master-5218-rr