04 - Git - Exercise 4
Task 1 - Clone your first repository
Open GitBash and create a new folder in a location where you can find it.
Navigate into this folder.
Clone your remote repository - in GitHub copy the link that was generated for your repo and use it in the following command
git clone <URL>
Navigate into the cloned folder - there is a new folder after cloning!
Task 2 - Push your personal website code
In your File Explorer, copy all the files and folders you used for your personal website and paste them into the cloned folder.
Back in GitBash, check that git can find your files -
git status
If you’re happy with what you see, stage all the files and folders -
git add .
Commit your changes with a sensible message -
git commit -m "my awesome page"
And last step - push your code!
git push
In your browser, refresh GitHub page and check that your files made it safely to the repository.
Task 3 - Push into each other’s repository
On the GitHub page, inside the space of your repository, click on the
Settings
tab.Within the
Collaborators
tab you are able to search for your pair and add her as collaborator.GitHub will email your pair and it will need to be accepted!
Clone each other’s repository, make a small change and push it back!