This github repository will walk you through setting up your Git and GitHub accounts. The intention of this project is to ensure your computer's environment is set up correctly and to give a preview of the Git work flow. A deeper-dive into Git with additional functionality and explanations of each command will be part of your continued learning at BloomTech.
- View this README
- Create a GitHub Account
- Open your Command Line Interface
- Setting up your Username and Email
- Setting up your Authentication
- Forking a Repository
- Cloning a Repository
- Making Changes to the Repository
- Committing Changes Locally
- Moving Changes to GitHub
- Standard Work Flow
First step complete! Welcome and good luck over the next steps! If you run into issues please visit the Hub's discussion forums or submit a ticket for assistance.
One time only.
If you have not already created a GitHub account, follow this GitHub link.
Click Sign Up and follow the instructions. During setup you will need to verify your email, which is likely the final step.
Become familiar with this step as you will use it often in your career.
MacOS
Open the Terminal:
Command Key + Spacebar
then typeterminal
in the search.
Windows
Install GitBash for Windows if you have not already done so. Open GitBash:
Windows Key
then typegit bash
in the search.
This step will need to be completed once per different computer you will use.
-
On your Command Line Interface, type:
git config --global user.name "Put your Name in Here"
git config --global user.email your@email.here
-
Check to see if that worked! Type:
git config --list
You should see two lines in this list matching your values! Other lines are likely in the list as well.
user.name=Radhika Zaur user.email=radhika.zaur@bloomtech.com
This step will need to be completed once per different computer you will use.
Choose to walk along with a video for setting up a personal access token or to follow the instructions directly from GitHub.
This step will need to be completed once per repository you wish to have your own copy of on GitHub
- On the GitHub page this README is located, near the top right select
Fork
. - Under
Owner
, select your account. - Under
Repository name
, you may adjust the name of the repository if you like. - On the bottom of the page select
Create fork
. - You should be redirected to a new repository associated with your user account on GitHub.
This step will need to be once per repository you wish to place on your local computer.
- Look for the green
Code
button on GitHub and select it. - Select
HTTPS
if it is not currently selected. - Select the
copy
icon next to the displayedhttps://github.com/...
link. - On your Command Line Interface, begin by moving to the directory you will store this repository.
Example:
cd ~/Bloom-Repos/
If you need to build a new directory, follow these steps:cd ~ mkdir Bloom-Repos cd Bloom-Repos
- Type:
git clone
then right click and paste the text you copied.Example:
git clone https://github.com/bloominstituteoftechnology/orientation-web-git
- Type
ls
to view the newly cloned repository on your local computer.
This step will typically involve you working on your project with integrated development environments.
- Move into the repository you cloned in your CLI by typing:
cd orientation-web-git
. Your directory name may be slightly different. - Type
ls
. You should see a file called README.md. - Your next goal is to open that file and edit it. Instructions below will use a basic text editor, but you may open the file any way you wish to modify the text inside.
MacOS: type
open -e README.md
Windows: typenotepad README.md
- Place an
x
in each step you completed of the Checklist. This is simulating you modifying files while working on a project. You should not place anx
in the Committing Changes Locally or Moving Changes to GitHub yet. - Save your changes/
MacOS: press
Command S
Windows: pressCTRL S
- Close your editor and return to your command line interface. You should still be in the same directory as before.
This step will typically be done one or more times on a project. Larger projects may require you to complete this step many times.
- On your Command Line, type:
Attention: the
git add .
.
above is intentional. The.
identifies to Git to add all changed files. - Type:
Attention: Be careful with the
git commit -m "Checked off my finished tasks"
"
quotes"
in the message above. Make sure to start and end the quotes.
This step will typically be done one or more times on a project. If connected to Codegrade, this will cause your project to be scored again.
- Type:
git push origin main
- Return to your GitHub repository page. Refresh if needed.
- Check that the README.md file has been recently updated.
- Scroll down to see the Xs you finished.
- On your local computer, edit the README.md file again to add
x
s to your now finished tasks.Technically you have not finished the Standard Work Flow task, leave it without an
x
. - Practice adding, committing, and pushing. Check if your updates appear on GitHub.
Adjust the message accordingly, ie:
Checked off additional finished tasks
- Repeat this process one final time for your final
x
. You want to become familiar with the process.
Git will be a tool you likely use daily throughout your career.
This was a minimal dive into Git to make certain your computer's environment is set correctly. A deeper-dive into Git with additional functionality and explanations will be part of your continued learning at BloomTech.