If you haven't installed git, please see instructions below.
Solve the following challenges with your workshop buddy (pair programming).
Cheatsheet for Mac & Linux Users
Cheatsheet for Windows Users
- Using the terminal make sure your working directory is set to desktop.
- On GitHub Fork the repositiory (so that you are the Master of that repository) >>
git clone
your new repository onto your Desktopcd
into that repository.
- Create a new branch and
git checkout
into it. - Update the HTML file with your name and a star beside it then save your file.
- To save your new version, first
git add
the updated HTML file. - Then commit the changes on that branch with a message:
git commit -m "write a unique message"
- Run
git remote -v
to see what remote repository is linked to your project. - Finally, git push your branch to GitHub. (Make sure to push the branch using
git push origin branch-name
)
- On GitHub, open a Pull Request on GitHub for me to review.
- If your Pull Request got accepted, your changes are added to the Hall of Fame
- Open your terminal .
- Create a new folder on your Desktop using your command line.
- Find the command to change to that folder (directory).
- Inside your new directory, create a new file called text.txt
- Initialize git for that directory.
- On your Desktop, open that file with a text editor.
- Write "Github 101" in that file, close it and save the file.
- Which Git command do you use to review what changed in the HTML?
- Make a new commit with a message to describe the changes you made.
- Create a new branch and jump onto that branch. How do you know how many branches there are in the project? How do you know which branch you are on?
- Now,
git checkout
to your master branch and then merge your branch to the master branch.
Git Installation | |
---|---|
1 | In your terminal, run the command: git version . If Git is not installed, you can find the install file here |
2 | Set your username and email on git. To set username, run git config --global user.name “your name” . To run your email : git config --global user.email “your email” |
Optional: To make your terminal more user-friendly, install oh-my-zsh | |
---|---|
For Mac & Linux Users: The installations instructions are here. You can also just run this command in your terminal: sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
|
b) For Windows 10 Users: You can find installations instructions here, but the process is much much longer, so it is recommended that you do this at home. |