Github and Website Workshop/git-partner-programming: Difference between revisions
imported>Auria m (Auria moved page Github and Website Workshop/git-push-pull to Github and Website Workshop/git-partner-programming: updating content) |
imported>Auria No edit summary |
||
Line 1: | Line 1: | ||
Welcome to |
Welcome to Challenge 10 of the [https://openhatch.org/wiki/Github_and_Website_Workshop Github and Website Workshop] - partner up! |
||
==Find a partner== |
==Find a partner== |
||
Line 6: | Line 5: | ||
It's okay if you don't know them - you're all pretty cool (you're at the workshop, after all). |
It's okay if you don't know them - you're all pretty cool (you're at the workshop, after all). |
||
This partner is going to be |
This partner is going to be helping you implement div.table-row and div.table-cell |
||
==Challenge== |
|||
==Clone someone else's code== |
|||
Go through the follow steps with one person as “you” and the other as “partner” |
|||
[https://openhatch.org/wiki/Github_and_Website_Workshop/fork_a_template Earlier], you put your repository from Github into a folder on your computer. |
|||
When you’re finished, switch positions and repeat these steps (if you would like to) |
|||
See if you can follow the same steps to put your partner's repository in another folder on your computer. |
|||
'''You''' |
|||
You do NOT need to fork this repository - start after this step. (Fork creates a completely separate copy, and you want their code and their repository on your computer) |
|||
* Go to your repository page on GitHub, click “Settings” (on the right-hand side) and select the “Collaborators” tab |
|||
* Search and add your partner’s GitHub username |
|||
'''Partner''' |
|||
==Edit each other's code== |
|||
* In the terminal, run git clone [your partner’s repo] to get a copy of their website code |
|||
* Challenge: style div.table-row and div.table-cell |
|||
** Hint: look at the W3 School’s documentation for the display property |
|||
* Commit and push the changes when you’re ready |
|||
'''You''' |
|||
Talk with each and talk about things you'd think could be better. Change anything you like! |
|||
⚫ | |||
⚫ | |||
'''Partner''' |
|||
Work on this for about 15 minutes. |
|||
* Challenge: add padding between table-cells (give your partner an undesired value) |
|||
* Commit and push the changes when you’re ready |
|||
'''You''' |
|||
==commit and push== |
|||
* Challenge: add padding between table-cells (use a desired value) |
|||
* Commit and push the changes when you’re ready |
|||
Bam, you will notice that there’s a merge conflict! |
|||
Commit your code and push it back to the remote server. Now you can bring the changes to your own website back to your own computer. |
|||
If you refresh portfolio.html, you will notice something along the lines of: |
|||
==pull in changes== |
|||
<code> |
|||
⚫ | |||
<<<<<<< HEAD |
|||
[your change] |
|||
======= |
|||
[partner’s change] |
|||
>>>>>>> master |
|||
</code> |
|||
To resolve the conflict erase “<<<<<<< HEAD”, “=======”, and “>>>>>>> master” and keep erase [partner’s change] |
|||
⚫ | |||
Try pushing again - conflict solved. |
|||
Make sure your files are updated, and continue to the next lesson. |
|||
Feel free to continue to contribute to each other's websites (using push and pull)! |
Feel free to continue to contribute to each other's websites (using push and pull)! |
Revision as of 02:32, 28 February 2015
Welcome to Challenge 10 of the Github and Website Workshop - partner up!
Find a partner
It's okay if you don't know them - you're all pretty cool (you're at the workshop, after all).
This partner is going to be helping you implement div.table-row and div.table-cell
Challenge
Go through the follow steps with one person as “you” and the other as “partner”
When you’re finished, switch positions and repeat these steps (if you would like to)
You
- Go to your repository page on GitHub, click “Settings” (on the right-hand side) and select the “Collaborators” tab
- Search and add your partner’s GitHub username
Partner
- In the terminal, run git clone [your partner’s repo] to get a copy of their website code
- Challenge: style div.table-row and div.table-cell
- Hint: look at the W3 School’s documentation for the display property
- Commit and push the changes when you’re ready
You
- When someone else changes files in a repository, you can update the files on your computer using a command that works somewhat opposite to git push
- Enter this command: git pull in the terminal to get your partner’s changes
Partner
- Challenge: add padding between table-cells (give your partner an undesired value)
- Commit and push the changes when you’re ready
You
- Challenge: add padding between table-cells (use a desired value)
- Commit and push the changes when you’re ready
Bam, you will notice that there’s a merge conflict!
If you refresh portfolio.html, you will notice something along the lines of:
<<<<<<< HEAD
[your change]
=======
[partner’s change]
>>>>>>> master
To resolve the conflict erase “<<<<<<< HEAD”, “=======”, and “>>>>>>> master” and keep erase [partner’s change]
Try pushing again - conflict solved.
Feel free to continue to contribute to each other's websites (using push and pull)!