Github Collab
Mix.install([
{:jason, "~> 1.4"},
{:kino, "~> 0.9", override: true},
{:youtube, github: "brooklinjazz/youtube"},
{:hidden_cell, github: "brooklinjazz/hidden_cell"}
])
Navigation
Home Report An Issue Github Engineering JournalCommentsCollab
With a partner, you’re going to create a collaborative GitHub project.
One partner will be the CREATOR and the other partner(s) will be the CONTRIBUTORS. Decide on your role and complete the exercise.
-
CREATOR: Setup a git project called
collab
. - CREATOR: Connect the git project to a public github repository.
- CREATOR: Add your partner as a contributor to the GitHub project.
- CONTRIBUTORS: Clone the github project onto your local machine.
-
CONTRIBUTORS: Create a new branch
bug-fix
-
CONTRIBUTORS: Stage, commit, and push a new file
your_name.txt
(where your_name is your name). - CONTRIBUTORS: Create a pull request for the bug-fix branch.
- CREATOR: Review the pull request and accept the changes.
- CREATOR: pull the main branch and see the changes on your local git project.
Merge Conflicts
Sometimes when you create a pull request, other pull requests may be accepted which creates merge conflicts.
You and your partner(s) are going to walk through the flow of resolving a merge conflict.
Using your existing collab
project:
-
CONTRIBUTORS: Create a new branch
conflict-your_name
whereyour_name
is the CONTRIBUTOR‘s name. -
CREATOR: Create a new branch
conflict-your_name
whereyour_name
is the CREATOR‘s name. -
CONTRIBUTORS: Stage, commit, and push a new file
conflict.txt
. Enter the CONTRIBUTORS‘s name as the file’s contents. -
CREATOR: Stage, commit, and push a new file
conflict.txt
. Enter the CREATOR‘s name as the file’s contents. -
CONTRIBUTORS: Create a pull request for the
conflict-your_name
branch. -
CREATOR: Create a pull request for the
conflict-your_name
branch. - CREATOR: Review the CONTRIBUTOR‘s pull request and accept the changes.
-
CREATOR: Notice that your
conflict-your_name
branch now has merge conflicts and cannot be merged. - CREATOR: Resolve the conflicts and merge your pull request
Open Source
Sometimes you want a project to be open to changes from other developers, not just the allowed contributors. We’ll use your existing collab
project to walk through the flow for contributing to an open source project.
The creator of the collab
project will remain the CREATOR, and the CONTRIBUTORS on your current project will each find a different group to be an OSS CONTRIBUTOR to.
- OSS CONTRIBUTOR: Create a fork of the CREATOR‘s project.
- OSS CONTRIBUTOR: Clone the fork onto your local machine.
- OSS CONTRIBUTOR: Create a new branch.
-
OSS CONTRIBUTOR: Stage, commit, and push a new file
your_name.txt
(whereyour_name
is your name.) - OSS CONTRIBUTOR: Create a pull request from your fork to the CREATOR‘s project.
- CREATOR: Review and accept the pull request.
- OSS CONTRIBUTOR: pull the main branch and see the changes on your local git project.
Commit Your Progress
DockYard Academy now recommends you use the latest Release rather than forking or cloning our repository.
Run git status
to ensure there are no undesirable changes.
Then run the following in your command line from the curriculum
folder to commit your progress.
$ git add .
$ git commit -m "finish Github Collab exercise"
$ git push
We’re proud to offer our open-source curriculum free of charge for anyone to learn from at their own pace.
We also offer a paid course where you can learn from an instructor alongside a cohort of your peers. We will accept applications for the June-August 2023 cohort soon.