How to use GitHub Classroom 101 (PC)
This is a quick tutorial based on:
- It explains how to use GitHub classroom
- The idea is you are going to:
- create a local repository
- download a GitHub repository to work on
- when you are finished upload your answer
- Install Git
- Set git config up:
- username, email
- consider using an email
- text editor
- Navigate to a local folder where you are going to work on project
Open git bash (you need have installed it)
.gitfolder will have been created
On GitHub website: - Clone repository -> Copy URL
Back on local git bash:
git remote add origin <url> https://github.com/mrdavidlewis/hello-world.git https://github.com/mrdavidlewis/tlacs.git
- A remote has been added to this repository
- the remote is given the alias origin
- the remote is located at the url
git pull origin master
git pull as described https://git-scm.com/docs/git-pull
- "Incorporates changes from a remote repository into the current branch."
git pullis shorthand for
git fetchfollowed by
git merge FETCH_HEAD
So what is
git fetch. It gets the data from another repository.
You can now work on your local copy.
Find out what has changed (locally):
Upload your work back to GitHub
git add .
git commit -m "updated readme"
You need your GitHub details when you do this:
git push origin master