Skip to content

Commit

Permalink
Merge pull request #164 from zaneveld/git_diagram
Browse files Browse the repository at this point in the history
Update to github draft chapter
  • Loading branch information
zaneveld committed Aug 7, 2023
2 parents 03c72a9 + 6e3fe96 commit 2e27811
Showing 1 changed file with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,27 @@
"This ends up being extremely useful! Imagine that you are doing a genomic analysis project with a group. A team member is writing a new function to calculate k-mer content, while you are working on code to download genomes from NCBI. Along the way, you both also make some fixes to the existing code. Now you meet and have to try to combine your work. But which lines changed, and in which files? While its certainly possible to sort out, its time consuming, and very easy to make mistakes when combining your work. GitHub helps with this by being able to automatically merging changes from different team members (as long as they don't directly contradict or *conflict* with each other)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Installing Git\n",
"The easiest way to install git differs a little bit between MacOSX and PC\n",
"\n",
"- xcode for MacOSX\n",
"- Git BASH for Windows\n",
"\n",
"### Setting up GitHub\n",
"\n",
"- Creating a free account\n",
"\n",
"### Configuring your system to allow command line interaction with GitHub\n",
"\n",
"- Creating a private and public SSH key\n",
"- Setting up ~/.ssh/config to use your keys\n",
"- Creating a 'Personal Access Token'"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -83,7 +104,13 @@
"\n",
"### Setup: create a fork on GitHub and set the shared group repository as its `upstream`\n",
"\n",
"<img src=\"./resources/1_github_diagram_setup_only copy.png\" width=\"600\" description=\"A workflow diagram of the first two setup steps when working with a shared GitHub repository. The top half of the diagram is in pink and marked 'Cloud' with a GitHub icon. The bottom half is in orange and marked 'Your Computer' with a laptop icon. The two sides are divided by a dashed line. The steps and their icons are labelled as follows: Setup Step 1. A pink cloud on the left marked Main Project 'upstream', main branch is connected by an arrow to a pink cloud on the right labelled Personal Fork 'origin', main branch. THe arrow connecting them is labelled Setup Step 1. Fork on GitHub website. \">"
"<img src=\"./resources/1_github_diagram_setup_only copy.png\" width=\"600\" description=\"A workflow diagram of the first two setup steps when working with a shared GitHub repository. The top half of the diagram is in pink and marked 'Cloud' with a GitHub icon. The bottom half is in orange and marked 'Your Computer' with a laptop icon. The two sides are divided by a dashed line. The steps and their icons are labelled as follows: Setup Step 1. A pink cloud on the left marked Main Project 'upstream', main branch is connected by an arrow to a pink cloud on the right labelled Personal Fork 'origin', main branch. THe arrow connecting them is labelled Setup Step 1. Fork on GitHub website. \">\n",
"\n",
"Setup steps:\n",
"\n",
"1. Fork the main project\n",
"2. `git clone git@github.com:<your_username>/<your_forked_repository_name>.git`\n",
"3. `git remote add upstream git@github.com:<user>/<main_repository_name>.git`"
]
},
{
Expand Down

0 comments on commit 2e27811

Please sign in to comment.