diff --git a/docs/resources/github_basics.md b/docs/resources/github_basics.md index 256712a..146a4b6 100644 --- a/docs/resources/github_basics.md +++ b/docs/resources/github_basics.md @@ -1 +1,418 @@ -{"payload":{"allShortcutsEnabled":true,"fileTree":{"docs/1_GIT_on_the_Cloud":{"items":[{"name":"collaboration.md","path":"docs/1_GIT_on_the_Cloud/collaboration.md","contentType":"file"},{"name":"github_cyverse.md","path":"docs/1_GIT_on_the_Cloud/github_cyverse.md","contentType":"file"},{"name":"github_lesson.md","path":"docs/1_GIT_on_the_Cloud/github_lesson.md","contentType":"file"},{"name":"github_lesson.qmd","path":"docs/1_GIT_on_the_Cloud/github_lesson.qmd","contentType":"file"}],"totalCount":4},"docs":{"items":[{"name":"1_GIT_on_the_Cloud","path":"docs/1_GIT_on_the_Cloud","contentType":"directory"},{"name":"2_R_Python_Bilingualism","path":"docs/2_R_Python_Bilingualism","contentType":"directory"},{"name":"3_EDS_Data_Cube","path":"docs/3_EDS_Data_Cube","contentType":"directory"},{"name":"4_Artificial_Intelligence","path":"docs/4_Artificial_Intelligence","contentType":"directory"},{"name":"Our Team","path":"docs/Our Team","contentType":"directory"},{"name":"Why data cubes","path":"docs/Why data cubes","contentType":"directory"},{"name":"assets","path":"docs/assets","contentType":"directory"},{"name":"code_for_building_cube","path":"docs/code_for_building_cube","contentType":"directory"},{"name":".DS_Store","path":"docs/.DS_Store","contentType":"file"},{"name":"dummy_file.txt","path":"docs/dummy_file.txt","contentType":"file"},{"name":"index.md","path":"docs/index.md","contentType":"file"}],"totalCount":11},"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":".DS_Store","path":".DS_Store","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"hackathon2023_datacube.Rproj","path":"hackathon2023_datacube.Rproj","contentType":"file"},{"name":"mkdocs.yml","path":"mkdocs.yml","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"}],"totalCount":9}},"fileTreeProcessingTime":7.387242,"foldersToFetch":[],"reducedMotionEnabled":"system","repo":{"id":685141441,"defaultBranch":"main","name":"hackathon2023_datacube","ownerLogin":"CU-ESIIL","currentUserCanPush":true,"isFork":false,"isEmpty":false,"createdAt":"2023-08-30T09:49:22.000-06:00","ownerAvatar":"https://avatars.githubusercontent.com/u/107436025?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":true,"treeExpanded":false,"refInfo":{"name":"main","listCacheKey":"v0:1700152465.0","canEdit":true,"refType":"branch","currentOid":"d47215418e5b8ce7c496ca3a5fc7db4676a35188"},"path":"docs/1_GIT_on_the_Cloud/github_lesson.md","currentUser":{"id":19940116,"login":"ttuff","userEmail":"ty.tuff@colorado.edu"},"blob":{"rawLines":null,"stylingDirectives":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":null,"configFilePath":null,"networkDependabotPath":"/CU-ESIIL/hackathon2023_datacube/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":false,"repoAlertsPath":"/CU-ESIIL/hackathon2023_datacube/security/dependabot","repoSecurityAndAnalysisPath":"/CU-ESIIL/hackathon2023_datacube/settings/security_analysis","repoOwnerIsOrg":true,"currentUserCanAdminRepo":true},"displayName":"github_lesson.md","displayUrl":"https://github.com/CU-ESIIL/hackathon2023_datacube/blob/main/docs/1_GIT_on_the_Cloud/github_lesson.md?raw=true","headerInfo":{"blobSize":"18.5 KB","deleteInfo":{"deleteTooltip":"Delete this file"},"editInfo":{"editTooltip":"Edit this file"},"ghDesktopPath":"x-github-client://openRepo/https://github.com/CU-ESIIL/hackathon2023_datacube?branch=main&filepath=docs%2F1_GIT_on_the_Cloud%2Fgithub_lesson.md","gitLfsPath":null,"onBranch":true,"shortPath":"146a4b6","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FCU-ESIIL%2Fhackathon2023_datacube%2Fblob%2Fmain%2Fdocs%2F1_GIT_on_the_Cloud%2Fgithub_lesson.md","isCSV":false,"isRichtext":true,"toc":[{"level":1,"text":"Github essentials","anchor":"github-essentials","htmlText":"Github essentials"},{"level":2,"text":"I. Introduction (2 minutes)","anchor":"i-introduction-2-minutes","htmlText":"I. Introduction (2 minutes)"},{"level":3,"text":"A. Brief overview of GitHub:","anchor":"a-brief-overview-of-github","htmlText":"A. Brief overview of GitHub:"},{"level":3,"text":"B. Introduce GitHub Desktop and JupyterHub GitHub widget:","anchor":"b-introduce-github-desktop-and-jupyterhub-github-widget","htmlText":"B. Introduce GitHub Desktop and JupyterHub GitHub widget:"},{"level":4,"text":"1. Download GitHub Desktop","anchor":"1-download-github-desktop","htmlText":"1. Download GitHub Desktop"},{"level":5,"text":"Step 1: Download GitHub Desktop","anchor":"step-1-download-github-desktop","htmlText":"Step 1: Download GitHub Desktop"},{"level":5,"text":"Step 2: Install GitHub Desktop","anchor":"step-2-install-github-desktop","htmlText":"Step 2: Install GitHub Desktop"},{"level":5,"text":"Step 3: Set up GitHub Desktop","anchor":"step-3-set-up-github-desktop","htmlText":"Step 3: Set up GitHub Desktop"},{"level":4,"text":"1. Download GitHub for JupyterHub cloud service","anchor":"1-download-github-for-jupyterhub-cloud-service","htmlText":"1. Download GitHub for JupyterHub cloud service"},{"level":3,"text":"Step 1: Accessing JupyterHub on the cloud","anchor":"step-1-accessing-jupyterhub-on-the-cloud","htmlText":"Step 1: Accessing JupyterHub on the cloud"},{"level":3,"text":"Step 2: Launch a new Jupyter Notebook or open an existing one","anchor":"step-2-launch-a-new-jupyter-notebook-or-open-an-existing-one","htmlText":"Step 2: Launch a new Jupyter Notebook or open an existing one"},{"level":3,"text":"Step 3: Install and enable the JupyterLab Git extension","anchor":"step-3-install-and-enable-the-jupyterlab-git-extension","htmlText":"Step 3: Install and enable the JupyterLab Git extension"},{"level":3,"text":"Step 4: Using the JupyterHub GitHub widget","anchor":"step-4-using-the-jupyterhub-github-widget","htmlText":"Step 4: Using the JupyterHub GitHub widget"},{"level":3,"text":"C. GitHub in Rstudio:","anchor":"c-github-in-rstudio","htmlText":"C. GitHub in Rstudio:"},{"level":4,"text":"Step 1: Install Git","anchor":"step-1-install-git","htmlText":"Step 1: Install Git"},{"level":4,"text":"Step 2: Configure RStudio to work with Git","anchor":"step-2-configure-rstudio-to-work-with-git","htmlText":"Step 2: Configure RStudio to work with Git"},{"level":4,"text":"Step 3: Create or open an RStudio project","anchor":"step-3-create-or-open-an-rstudio-project","htmlText":"Step 3: Create or open an RStudio project"},{"level":4,"text":"Step 4: Link your RStudio project to a GitHub repository","anchor":"step-4-link-your-rstudio-project-to-a-github-repository","htmlText":"Step 4: Link your RStudio project to a GitHub repository"},{"level":2,"text":"II. GitHub Basics (4 minutes)","anchor":"ii-github-basics-4-minutes","htmlText":"II. GitHub Basics (4 minutes)"},{"level":3,"text":"A. Repository:","anchor":"a-repository","htmlText":"A. Repository:"},{"level":3,"text":"B. Fork and Clone:","anchor":"b-fork-and-clone","htmlText":"B. Fork and Clone:"},{"level":3,"text":"C. Branches:","anchor":"c-branches","htmlText":"C. Branches:"},{"level":3,"text":"D. Replace ‘master’ with ‘main’:","anchor":"d-replace-master-with-main","htmlText":"D. Replace ‘master’ with ‘main’:"},{"level":2,"text":"III. Collaboration and Version Control (5 minutes)","anchor":"iii-collaboration-and-version-control-5-minutes","htmlText":"III. Collaboration and Version Control (5 minutes)"},{"level":3,"text":"A. Commits:","anchor":"a-commits","htmlText":"A. Commits:"},{"level":3,"text":"B. Push:","anchor":"b-push","htmlText":"B. Push:"},{"level":3,"text":"C. Pull Requests:","anchor":"c-pull-requests","htmlText":"C. Pull Requests:"},{"level":3,"text":"D. Merging and Resolving Conflicts:","anchor":"d-merging-and-resolving-conflicts","htmlText":"D. Merging and Resolving Conflicts:"},{"level":2,"text":"IV. Additional Features (2 minutes)","anchor":"iv-additional-features-2-minutes","htmlText":"IV. Additional Features (2 minutes)"},{"level":3,"text":"A. Issues and Project Management:","anchor":"a-issues-and-project-management","htmlText":"A. Issues and Project Management:"},{"level":3,"text":"B. GitHub Pages:","anchor":"b-github-pages","htmlText":"B. GitHub Pages:"},{"level":2,"text":"V. Conclusion (2 minutes)","anchor":"v-conclusion-2-minutes","htmlText":"V. Conclusion (2 minutes)"},{"level":3,"text":"A. Recap of the essentials of GitHub:","anchor":"a-recap-of-the-essentials-of-github","htmlText":"A. Recap of the essentials of GitHub:"},{"level":3,"text":"B. Encourage further exploration and learning:","anchor":"b-encourage-further-exploration-and-learning","htmlText":"B. Encourage further exploration and learning:"},{"level":3,"text":"C. Share resources for learning more about GitHub:","anchor":"c-share-resources-for-learning-more-about-github","htmlText":"C. Share resources for learning more about GitHub:"},{"level":2,"text":"V. Conclusion (2 minutes)","anchor":"v-conclusion-2-minutes-1","htmlText":"V. Conclusion (2 minutes)"},{"level":3,"text":"A. Recap of the essentials of GitHub:","anchor":"a-recap-of-the-essentials-of-github-1","htmlText":"A. Recap of the essentials of GitHub:"},{"level":3,"text":"B. Encourage further exploration and learning:","anchor":"b-encourage-further-exploration-and-learning-1","htmlText":"B. Encourage further exploration and learning:"},{"level":3,"text":"C. Share resources for learning more about GitHub:","anchor":"c-share-resources-for-learning-more-about-github-1","htmlText":"C. Share resources for learning more about GitHub:"}],"lineInfo":{"truncatedLoc":"418","truncatedSloc":"315"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplateHelpUrl":"https://docs.github.com/articles/about-issue-and-pull-request-templates","issueTemplate":null,"discussionTemplate":null,"language":"Markdown","languageID":222,"large":false,"loggedIn":true,"newDiscussionPath":"/CU-ESIIL/hackathon2023_datacube/discussions/new","newIssuePath":"/CU-ESIIL/hackathon2023_datacube/issues/new","planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/CU-ESIIL/hackathon2023_datacube/blob/main/docs/1_GIT_on_the_Cloud/github_lesson.md","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","dismissStackNoticePath":"/settings/dismiss-notice/publish_stack_from_file","releasePath":"/CU-ESIIL/hackathon2023_datacube/releases/new?marketplace=true","showPublishActionBanner":false,"showPublishStackBanner":false},"rawBlobUrl":"https://github.com/CU-ESIIL/hackathon2023_datacube/raw/main/docs/1_GIT_on_the_Cloud/github_lesson.md","renderImageOrRaw":false,"richText":"

Github essentials

\n

I. Introduction (2 minutes)

\n

A. Brief overview of GitHub:

\n

GitHub is a web-based platform that provides version control and\ncollaboration features using Git, a distributed version control system.\nIt enables developers to work together on projects, track changes to\ncode, and efficiently manage different versions of the project. GitHub\nis widely used in the software development industry and is an essential\ntool for collaborative projects and maintaining code quality.

\n

B. Introduce GitHub Desktop and JupyterHub GitHub widget:

\n

GitHub Desktop is a graphical user interface (GUI) application that\nsimplifies working with Git and GitHub by providing a more visual and\nintuitive way to manage repositories, branches, commits, and other Git\nfeatures. JupyterHub GitHub widget, on the other hand, is a built-in\nwidget that integrates Git and GitHub functionality directly into\nJupyter notebooks, allowing users to perform version control and\ncollaboration tasks within the Jupyter environment. Both tools help\nstreamline the process of working with GitHub and make it more\naccessible to users with varying levels of experience with Git and\nversion control.

\n

1. Download GitHub Desktop

\n
Step 1: Download GitHub Desktop
\n

Go to the GitHub Desktop download page: https://desktop.github.com/

\n

Click on the “Download for Windows” or “Download for macOS” button,\ndepending on your operating system. The download should start\nautomatically.

\n
Step 2: Install GitHub Desktop
\n

For Windows:

\n

Locate the downloaded installer file (usually in the Downloads folder)\nand double-click on it to run the installer.

\n

Follow the installation instructions that appear on the screen,\naccepting the default settings or customizing them as desired.

\n

Once the installation is complete, GitHub Desktop will launch\nautomatically. For macOS:

\n

Locate the downloaded .zip file (usually in the Downloads folder) and\ndouble-click on it to extract the GitHub Desktop application.

\n

Drag the extracted “GitHub Desktop” application into the “Applications”\nfolder.

\n

Open the “Applications” folder and double-click on “GitHub Desktop” to\nlaunch the application.

\n
Step 3: Set up GitHub Desktop
\n

When GitHub Desktop launches for the first time, you will be prompted to\nsign in with your GitHub account. If you don’t have one, you can create\none at https://github.com/join.

\n

Enter your GitHub username (or email) and password, and click on “Sign\nin.”

\n

You will then be prompted to configure Git. Enter your name and email\naddress, which will be used for your commit messages. Click “Continue”\nwhen you’re done. Choose whether you want to submit usage data to help\nimprove GitHub Desktop. Click “Finish” to complete the setup.

\n

Now, you have successfully installed and set up GitHub Desktop. You can\nstart using it to clone repositories, make changes, commit, and sync\nwith the remote repositories on GitHub.

\n

1. Download GitHub for JupyterHub cloud service

\n

Step 1: Accessing JupyterHub on the cloud

\n

Visit the JupyterHub cloud service you want to use (e.g., Binder, Google\nColab, or a custom JupyterHub deployment provided by your organization).

\n

Sign in with your credentials or authenticate using a third-party\nservice if required.

\n

Step 2: Launch a new Jupyter Notebook or open an existing one

\n

Click on the “New” button (usually located in the top right corner) and\nselect “Python” to create a new Jupyter Notebook or open an existing one\nfrom the file browser.

\n

Once the notebook is open, you will see the Jupyter Notebook interface\nwith the familiar cells for writing and executing code.

\n

Step 3: Install and enable the JupyterLab Git extension

\n

In your Jupyter Notebook, create a new code cell and run the following\ncommand to install the JupyterLab Git extension:

\n

!pip install jupyterlab-git

\n

Restart the Jupyter Notebook server for the changes to take effect.

\n

Step 4: Using the JupyterHub GitHub widget

\n

In the Jupyter Notebook interface, you should now see a Git icon on the\nleft sidebar. Click on it to open the GitHub widget.

\n

To clone a repository, click on the “+” icon in the GitHub widget and\nenter the repository URL. This will clone the repository into your\nJupyterHub workspace. You can now navigate through the cloned\nrepository, make changes, and use the GitHub widget to stage, commit,\nand push your changes back to the remote repository.

\n

To create and manage branches, use the branch icon in the GitHub widget.\nYou can create new branches, switch between branches, and merge branches\nusing this interface.

\n

To sync your local repository with the remote repository, use the “Pull”\nand “Push” buttons in the GitHub widget.

\n

Now, you know how to access and use the JupyterHub GitHub widget running\non the cloud. This allows you to work with Git and GitHub directly from\nyour Jupyter Notebook interface, streamlining your workflow and making\ncollaboration easier.

\n

C. GitHub in Rstudio:

\n

Integrating GitHub with RStudio allows users to manage their Git\nrepositories and collaborate on projects directly within the RStudio\nenvironment. It offers similar functionality to GitHub Desktop but\ncaters specifically to R users working within RStudio. By configuring\nRStudio to work with Git, creating or opening RStudio projects, and\nlinking projects to GitHub repositories, users can enjoy a seamless\nworkflow for version control and collaboration. RStudio’s Git pane\nenables users to stage, commit, and push changes to remote repositories,\nas well as manage branches and sync local repositories with remote ones,\nproviding a comprehensive solution for R developers working with GitHub.

\n

Step 1: Install Git

\n

Before integrating GitHub with RStudio, you need to have Git installed\non your computer. Visit the official Git website (https://git-scm.com/)\nto download and install the latest version of Git for your operating\nsystem.

\n

Step 2: Configure RStudio to work with Git

\n

Open RStudio.

\n

Go to “Tools” > “Global Options” in the top menu. In the “Global\nOptions” window, click on the “Git/SVN” tab.

\n

Check that the “Git executable” field is pointing to the correct\nlocation of the installed Git. If not, click “Browse” and navigate to\nthe location of the Git executable file (usually found in the “bin”\nfolder of the Git installation directory).

\n

Click “OK” to save the changes.

\n

Step 3: Create or open an RStudio project

\n

To create a new RStudio project, go to “File” > “New Project” in the\ntop menu. You can either create a new directory or choose an existing\none for your project.

\n

To open an existing RStudio project, go to “File” > “Open Project” and\nnavigate to the project’s “.Rproj” file.

\n

Step 4: Link your RStudio project to a GitHub repository

\n

In the RStudio project, go to the “Tools” menu and select “Version\nControl” > “Project Setup.”

\n

In the “Project Setup” window, select “Git” as the version control\nsystem and click “OK.”

\n

A new “.git” folder will be created in your project directory,\ninitializing it as a Git repository. Commit any changes you have made so\nfar by clicking on the “Commit” button in the “Git” pane in RStudio.

\n

To link your local repository to a remote GitHub repository, go to your\nGitHub account and create a new repository.

\n

Copy the remote repository’s URL (e.g.,\n“https://github.com/username/repository.git”).

\n

In RStudio, open the “Shell” by going to “Tools” > “Shell.”

\n

In the shell, run the following command to add the remote repository:

\n

git remote add origin https://github.com/username/repository.git

\n

Replace the URL with the one you copied from your GitHub repository.

\n

Push your changes to the remote repository by running the following\ncommand in the shell:

\n

git push -u origin master

\n

Now, your RStudio project is linked to a GitHub repository. You can use\nthe “Git” pane in RStudio to stage, commit, and push changes to the\nremote repository, as well as manage branches and sync your local\nrepository with the remote one.

\n

By integrating GitHub with RStudio, you can streamline your workflow,\ncollaborate more effectively with your team, and manage your Git\nrepositories directly from the RStudio interface.

\n

II. GitHub Basics (4 minutes)

\n

A. Repository:

\n

A repository, often abbreviated as “repo,” is the fundamental building\nblock of GitHub. It is a storage space for your project files, including\nthe code, documentation, and other related resources. Each repository\nalso contains the complete history of all changes made to the project\nfiles, which is crucial for effective version control. Repositories can\nbe public, allowing anyone to access and contribute, or private,\nrestricting access to specific collaborators.

\n

B. Fork and Clone:

\n

Forking and cloning are two essential operations for working with\nrepositories on GitHub. Forking creates a personal copy of someone\nelse’s repository under your GitHub account, enabling you to make\nchanges to the project without affecting the original repo. Cloning, on\nthe other hand, is the process of downloading a remote repository to\nyour local machine for offline development. In GitHub Desktop, you can\nclone a repository by selecting “Clone a repository from the Internet”\nand entering the repository URL. In JupyterHub GitHub widget, you can\nclone a repository by entering the repo URL in the “Clone Repository”\nsection of the widget.

\n

C. Branches:

\n

Branches are a critical aspect of Git version control, as they allow you\nto create multiple parallel versions of your project within a single\nrepository. This is particularly useful when working on new features or\nbug fixes, as it prevents changes from interfering with the main (or\n“master”) branch until they are ready to be merged. Creating a new\nbranch in GitHub Desktop can be done by clicking the “Current Branch”\ndropdown and selecting “New Branch.” In JupyterHub GitHub widget, you\ncan create a new branch by clicking the “New Branch” button in the\n“Branches” section of the widget.

\n

D. Replace ‘master’ with ‘main’:

\n

In recent years, there has been a growing awareness of the importance of\ninclusive language in technology. One such example is the use of the\nterm “master” in the context of the default branch in a GitHub\nrepository. The term “master” has historical connections to the\n“master/slave” file structure, which evokes an unsavory colonial past\nassociated with slavery. In light of this, many developers and\norganizations have begun to replace the term “master” with more neutral\nterms, such as “main.” We encourage you to follow this practice and\nchange the default branch name in your repositories from “master” to\n“main” or another suitable alternative. This small change can help\npromote a more inclusive and welcoming environment within the technology\ncommunity.

\n

III. Collaboration and Version Control (5 minutes)

\n

A. Commits:

\n

Commits are snapshots of your project’s changes at a specific point in\ntime, serving as the fundamental building blocks of Git’s version\ncontrol system. Commits make it possible to track changes, revert to\nprevious versions, and collaborate with others. In GitHub Desktop, you\ncan make a commit by staging the changes you want to include, adding a\ndescriptive commit message, and clicking “Commit to [branch_name].” In\nJupyterHub GitHub widget, you can create a commit by selecting the files\nwith changes, entering a commit message, and clicking the “Commit”\nbutton.

\n

B. Push:

\n

In GitHub, “push” is a fundamental operation in the version control\nprocess that transfers commits from your local repository to a remote\nrepository, such as the one hosted on GitHub. When you push changes, you\nsynchronize the remote repository with the latest updates made to your\nlocal repository, making those changes accessible to other collaborators\nworking on the same project. This operation ensures that the remote\nrepository reflects the most recent state of your work and allows your\nteam members to stay up to date with your changes. Pushing is an\nessential step in distributed version control systems like Git, as it\npromotes efficient collaboration among multiple contributors and\nprovides a centralized location for tracking the project’s history and\nprogress.

\n

In GitHub, the concepts of “commit” and “push” represent two distinct\nsteps in the version control process. A “commit” is the action of saving\nchanges to your local repository. When you commit changes, you create a\nsnapshot of your work, accompanied by a unique identifier and an\noptional descriptive message. Commits allow you to track the progress of\nyour work over time and make it easy to revert to a previous state if\nnecessary. On the other hand, “push” is the action of transferring your\nlocal commits to a remote repository, such as the one hosted on GitHub.\nPushing makes your changes accessible to others collaborating on the\nsame project and ensures that the remote repository stays up to date\nwith your local repository. In summary, committing saves changes\nlocally, while pushing synchronizes those changes with a remote\nrepository, allowing for seamless collaboration among multiple\ncontributors.

\n

C. Pull Requests:

\n

Pull requests are a collaboration feature on GitHub that enables\ndevelopers to propose changes to a repository, discuss those changes,\nand ultimately merge them into the main branch. To create a pull\nrequest, you must first push your changes to a branch on your fork of\nthe repository. Then, using either GitHub Desktop or JupyterHub GitHub\nwidget, you can navigate to the original repository, click the “Pull\nRequest” tab, and create a new pull request. After the pull request is\nreviewed and approved, it can be merged into the main branch.

\n

D. Merging and Resolving Conflicts:

\n

Merging is the process of combining changes from one branch into\nanother. This is typically done when a feature or bugfix has been\ncompleted and is ready to be integrated into the main branch. Conflicts\ncan arise during the merging process if the same lines of code have been\nmodified in both branches. To resolve conflicts, you must manually\nreview the changes and decide which version to keep. In GitHub Desktop,\nyou can merge branches by selecting the target branch and choosing\n“Merge into Current Branch.” Conflicts will be highlighted, and you can\nedit the files to resolve them before committing the changes. In\nJupyterHub GitHub widget, you can merge branches by selecting the target\nbranch in the “Branches” section and clicking the “Merge” button. If\nconflicts occur, the widget will prompt you to resolve them before\ncompleting the merge.

\n

IV. Additional Features (2 minutes)

\n

A. Issues and Project Management:

\n

Issues are a powerful feature in GitHub that allows developers to track\nand manage bugs, enhancements, and other tasks within a project. Issues\ncan be assigned to collaborators, labeled for easy organization, and\nlinked to specific commits or pull requests. They provide a centralized\nlocation for discussing and addressing project-related concerns,\nfostering collaboration and transparent communication among team\nmembers. Using issues effectively can significantly improve the overall\nmanagement and organization of your projects.

\n

B. GitHub Pages:

\n

GitHub Pages is a service offered by GitHub that allows you to host\nstatic websites directly from a repository. By creating a new branch\nnamed “gh-pages” in your repository and adding the necessary files\n(HTML, CSS, JavaScript, etc.), GitHub will automatically build and\ndeploy your website to a publicly accessible URL. This is particularly\nuseful for showcasing project documentation, creating personal\nportfolios, or hosting project demos. With GitHub Pages, you can take\nadvantage of the version control and collaboration features of GitHub\nwhile easily sharing your work with others.

\n

V. Conclusion (2 minutes)

\n

A. Recap of the essentials of GitHub:

\n

In this brief introduction, we have covered the essentials of GitHub,\nincluding the basics of repositories, forking, cloning, branching,\ncommits, pull requests, merging, and resolving conflicts. We have also\ndiscussed additional features like issues for project management and\nGitHub Pages for hosting websites directly from a repository.

\n

B. Encourage further exploration and learning:

\n

While this introduction provides a solid foundation for understanding\nand using GitHub, there is still much more to learn and explore. As you\ncontinue to use GitHub in your projects, you will discover new features\nand workflows that can enhance your productivity and collaboration. We\nencourage you to dive deeper into the platform and experiment with\ndifferent tools and techniques.

\n

C. Share resources for learning more about GitHub:

\n

There are many resources available for learning more about GitHub and\nexpanding your skills. Some popular resources include GitHub Guides\n(https://guides.github.com/), which offers a collection of tutorials and\nbest practices, the official GitHub documentation\n(https://docs.github.com/), and various online tutorials and courses. By\nengaging with these resources and participating in the GitHub community,\nyou can further develop your understanding of the platform and become a\nmore proficient user.

\n

V. Conclusion (2 minutes)

\n

A. Recap of the essentials of GitHub:

\n

In this brief introduction, we have covered the essentials of GitHub,\nincluding the basics of repositories, forking, cloning, branching,\ncommits, pull requests, merging, and resolving conflicts. We have also\ndiscussed additional features like issues for project management and\nGitHub Pages for hosting websites directly from a repository.

\n

B. Encourage further exploration and learning:

\n

While this introduction provides a solid foundation for understanding\nand using GitHub, there is still much more to learn and explore. As you\ncontinue to use GitHub in your projects, you will discover new features\nand workflows that can enhance your productivity and collaboration. We\nencourage you to dive deeper into the platform and experiment with\ndifferent tools and techniques.

\n

C. Share resources for learning more about GitHub:

\n

There are many resources available for learning more about GitHub and\nexpanding your skills. Some popular resources include GitHub Guides\n(https://guides.github.com/), which offers a collection of tutorials and\nbest practices, the official GitHub documentation\n(https://docs.github.com/), and various online tutorials and courses. By\nengaging with these resources and participating in the GitHub community,\nyou can further develop your understanding of the platform and become a\nmore proficient user.

\n
","renderedFileInfo":null,"shortPath":null,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"repoOwner":"CU-ESIIL","repoName":"hackathon2023_datacube","showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","showDependabotConfigurationBanner":null,"actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"Github essentials","kind":"section_1","ident_start":0,"ident_end":17,"extent_start":0,"extent_end":35,"fully_qualified_name":"Github essentials","ident_utf16":{"start":{"line_number":0,"utf16_col":0},"end":{"line_number":0,"utf16_col":17}},"extent_utf16":{"start":{"line_number":0,"utf16_col":0},"end":{"line_number":2,"utf16_col":0}}},{"name":"I. Introduction (2 minutes)","kind":"section_2","ident_start":39,"ident_end":66,"extent_start":36,"extent_end":8331,"fully_qualified_name":"I. Introduction (2 minutes)","ident_utf16":{"start":{"line_number":3,"utf16_col":3},"end":{"line_number":3,"utf16_col":30}},"extent_utf16":{"start":{"line_number":3,"utf16_col":0},"end":{"line_number":211,"utf16_col":0}}},{"name":"A. Brief overview of GitHub:","kind":"section_3","ident_start":72,"ident_end":100,"extent_start":68,"extent_end":514,"fully_qualified_name":"A. Brief overview of GitHub:","ident_utf16":{"start":{"line_number":5,"utf16_col":4},"end":{"line_number":5,"utf16_col":32}},"extent_utf16":{"start":{"line_number":5,"utf16_col":0},"end":{"line_number":14,"utf16_col":0}}},{"name":"B. Introduce GitHub Desktop and JupyterHub GitHub widget:","kind":"section_3","ident_start":518,"ident_end":575,"extent_start":514,"extent_end":3028,"fully_qualified_name":"B. Introduce GitHub Desktop and JupyterHub GitHub widget:","ident_utf16":{"start":{"line_number":14,"utf16_col":4},"end":{"line_number":14,"utf16_col":61}},"extent_utf16":{"start":{"line_number":14,"utf16_col":0},"end":{"line_number":79,"utf16_col":0}}},{"name":"1. Download GitHub Desktop","kind":"section_4","ident_start":1207,"ident_end":1233,"extent_start":1202,"extent_end":2974,"fully_qualified_name":"1. Download GitHub Desktop","ident_utf16":{"start":{"line_number":27,"utf16_col":5},"end":{"line_number":27,"utf16_col":31}},"extent_utf16":{"start":{"line_number":27,"utf16_col":0},"end":{"line_number":77,"utf16_col":0}}},{"name":"Step 1: Download GitHub Desktop","kind":"section_5","ident_start":1241,"ident_end":1272,"extent_start":1235,"extent_end":1497,"fully_qualified_name":"Step 1: Download GitHub Desktop","ident_utf16":{"start":{"line_number":29,"utf16_col":6},"end":{"line_number":29,"utf16_col":37}},"extent_utf16":{"start":{"line_number":29,"utf16_col":0},"end":{"line_number":37,"utf16_col":0}}},{"name":"Step 2: Install GitHub Desktop","kind":"section_5","ident_start":1503,"ident_end":1533,"extent_start":1497,"extent_end":2209,"fully_qualified_name":"Step 2: Install GitHub Desktop","ident_utf16":{"start":{"line_number":37,"utf16_col":6},"end":{"line_number":37,"utf16_col":36}},"extent_utf16":{"start":{"line_number":37,"utf16_col":0},"end":{"line_number":59,"utf16_col":0}}},{"name":"Step 3: Set up GitHub Desktop","kind":"section_5","ident_start":2215,"ident_end":2244,"extent_start":2209,"extent_end":2974,"fully_qualified_name":"Step 3: Set up GitHub Desktop","ident_utf16":{"start":{"line_number":59,"utf16_col":6},"end":{"line_number":59,"utf16_col":35}},"extent_utf16":{"start":{"line_number":59,"utf16_col":0},"end":{"line_number":77,"utf16_col":0}}},{"name":"1. Download GitHub for JupyterHub cloud service","kind":"section_4","ident_start":2979,"ident_end":3026,"extent_start":2974,"extent_end":3028,"fully_qualified_name":"1. Download GitHub for JupyterHub cloud service","ident_utf16":{"start":{"line_number":77,"utf16_col":5},"end":{"line_number":77,"utf16_col":52}},"extent_utf16":{"start":{"line_number":77,"utf16_col":0},"end":{"line_number":79,"utf16_col":0}}},{"name":"Step 1: Accessing JupyterHub on the cloud","kind":"section_3","ident_start":3032,"ident_end":3073,"extent_start":3028,"extent_end":3310,"fully_qualified_name":"Step 1: Accessing JupyterHub on the cloud","ident_utf16":{"start":{"line_number":79,"utf16_col":4},"end":{"line_number":79,"utf16_col":45}},"extent_utf16":{"start":{"line_number":79,"utf16_col":0},"end":{"line_number":87,"utf16_col":0}}},{"name":"Step 2: Launch a new Jupyter Notebook or open an existing one","kind":"section_3","ident_start":3314,"ident_end":3375,"extent_start":3310,"extent_end":3682,"fully_qualified_name":"Step 2: Launch a new Jupyter Notebook or open an existing one","ident_utf16":{"start":{"line_number":87,"utf16_col":4},"end":{"line_number":87,"utf16_col":65}},"extent_utf16":{"start":{"line_number":87,"utf16_col":0},"end":{"line_number":96,"utf16_col":0}}},{"name":"Step 3: Install and enable the JupyterLab Git extension","kind":"section_3","ident_start":3686,"ident_end":3741,"extent_start":3682,"extent_end":3962,"fully_qualified_name":"Step 3: Install and enable the JupyterLab Git extension","ident_utf16":{"start":{"line_number":96,"utf16_col":4},"end":{"line_number":96,"utf16_col":59}},"extent_utf16":{"start":{"line_number":96,"utf16_col":0},"end":{"line_number":105,"utf16_col":0}}},{"name":"Step 4: Using the JupyterHub GitHub widget","kind":"section_3","ident_start":3966,"ident_end":4008,"extent_start":3962,"extent_end":4994,"fully_qualified_name":"Step 4: Using the JupyterHub GitHub widget","ident_utf16":{"start":{"line_number":105,"utf16_col":4},"end":{"line_number":105,"utf16_col":46}},"extent_utf16":{"start":{"line_number":105,"utf16_col":0},"end":{"line_number":128,"utf16_col":0}}},{"name":"C. GitHub in Rstudio:","kind":"section_3","ident_start":4998,"ident_end":5019,"extent_start":4994,"extent_end":8331,"fully_qualified_name":"C. GitHub in Rstudio:","ident_utf16":{"start":{"line_number":128,"utf16_col":4},"end":{"line_number":128,"utf16_col":25}},"extent_utf16":{"start":{"line_number":128,"utf16_col":0},"end":{"line_number":211,"utf16_col":0}}},{"name":"Step 1: Install Git","kind":"section_4","ident_start":5722,"ident_end":5741,"extent_start":5717,"extent_end":5964,"fully_qualified_name":"Step 1: Install Git","ident_utf16":{"start":{"line_number":141,"utf16_col":5},"end":{"line_number":141,"utf16_col":24}},"extent_utf16":{"start":{"line_number":141,"utf16_col":0},"end":{"line_number":148,"utf16_col":0}}},{"name":"Step 2: Configure RStudio to work with Git","kind":"section_4","ident_start":5969,"ident_end":6011,"extent_start":5964,"extent_end":6452,"fully_qualified_name":"Step 2: Configure RStudio to work with Git","ident_utf16":{"start":{"line_number":148,"utf16_col":5},"end":{"line_number":148,"utf16_col":47}},"extent_utf16":{"start":{"line_number":148,"utf16_col":0},"end":{"line_number":162,"utf16_col":0}}},{"name":"Step 3: Create or open an RStudio project","kind":"section_4","ident_start":6457,"ident_end":6498,"extent_start":6452,"extent_end":6799,"fully_qualified_name":"Step 3: Create or open an RStudio project","ident_utf16":{"start":{"line_number":162,"utf16_col":5},"end":{"line_number":162,"utf16_col":46}},"extent_utf16":{"start":{"line_number":162,"utf16_col":0},"end":{"line_number":171,"utf16_col":0}}},{"name":"Step 4: Link your RStudio project to a GitHub repository","kind":"section_4","ident_start":6804,"ident_end":6860,"extent_start":6799,"extent_end":8331,"fully_qualified_name":"Step 4: Link your RStudio project to a GitHub repository","ident_utf16":{"start":{"line_number":171,"utf16_col":5},"end":{"line_number":171,"utf16_col":61}},"extent_utf16":{"start":{"line_number":171,"utf16_col":0},"end":{"line_number":211,"utf16_col":0}}},{"name":"II. GitHub Basics (4 minutes)","kind":"section_2","ident_start":8334,"ident_end":8363,"extent_start":8331,"extent_end":11004,"fully_qualified_name":"II. GitHub Basics (4 minutes)","ident_utf16":{"start":{"line_number":211,"utf16_col":3},"end":{"line_number":211,"utf16_col":32}},"extent_utf16":{"start":{"line_number":211,"utf16_col":0},"end":{"line_number":263,"utf16_col":0}}},{"name":"A. Repository:","kind":"section_3","ident_start":8369,"ident_end":8383,"extent_start":8365,"extent_end":8857,"fully_qualified_name":"A. Repository:","ident_utf16":{"start":{"line_number":213,"utf16_col":4},"end":{"line_number":213,"utf16_col":18}},"extent_utf16":{"start":{"line_number":213,"utf16_col":0},"end":{"line_number":223,"utf16_col":0}}},{"name":"B. Fork and Clone:","kind":"section_3","ident_start":8861,"ident_end":8879,"extent_start":8857,"extent_end":9537,"fully_qualified_name":"B. Fork and Clone:","ident_utf16":{"start":{"line_number":223,"utf16_col":4},"end":{"line_number":223,"utf16_col":22}},"extent_utf16":{"start":{"line_number":223,"utf16_col":0},"end":{"line_number":236,"utf16_col":0}}},{"name":"C. Branches:","kind":"section_3","ident_start":9541,"ident_end":9553,"extent_start":9537,"extent_end":10167,"fully_qualified_name":"C. Branches:","ident_utf16":{"start":{"line_number":236,"utf16_col":4},"end":{"line_number":236,"utf16_col":16}},"extent_utf16":{"start":{"line_number":236,"utf16_col":0},"end":{"line_number":248,"utf16_col":0}}},{"name":"D. Replace ‘master’ with ‘main’:","kind":"section_3","ident_start":10171,"ident_end":10211,"extent_start":10167,"extent_end":11004,"fully_qualified_name":"D. Replace ‘master’ with ‘main’:","ident_utf16":{"start":{"line_number":248,"utf16_col":4},"end":{"line_number":248,"utf16_col":36}},"extent_utf16":{"start":{"line_number":248,"utf16_col":0},"end":{"line_number":263,"utf16_col":0}}},{"name":"III. Collaboration and Version Control (5 minutes)","kind":"section_2","ident_start":11007,"ident_end":11057,"extent_start":11004,"extent_end":14857,"fully_qualified_name":"III. Collaboration and Version Control (5 minutes)","ident_utf16":{"start":{"line_number":263,"utf16_col":3},"end":{"line_number":263,"utf16_col":53}},"extent_utf16":{"start":{"line_number":263,"utf16_col":0},"end":{"line_number":334,"utf16_col":0}}},{"name":"A. Commits:","kind":"section_3","ident_start":11063,"ident_end":11074,"extent_start":11059,"extent_end":11658,"fully_qualified_name":"A. Commits:","ident_utf16":{"start":{"line_number":265,"utf16_col":4},"end":{"line_number":265,"utf16_col":15}},"extent_utf16":{"start":{"line_number":265,"utf16_col":0},"end":{"line_number":277,"utf16_col":0}}},{"name":"B. Push:","kind":"section_3","ident_start":11662,"ident_end":11670,"extent_start":11658,"extent_end":13382,"fully_qualified_name":"B. Push:","ident_utf16":{"start":{"line_number":277,"utf16_col":4},"end":{"line_number":277,"utf16_col":12}},"extent_utf16":{"start":{"line_number":277,"utf16_col":0},"end":{"line_number":307,"utf16_col":0}}},{"name":"C. Pull Requests:","kind":"section_3","ident_start":13386,"ident_end":13403,"extent_start":13382,"extent_end":13953,"fully_qualified_name":"C. Pull Requests:","ident_utf16":{"start":{"line_number":307,"utf16_col":4},"end":{"line_number":307,"utf16_col":21}},"extent_utf16":{"start":{"line_number":307,"utf16_col":0},"end":{"line_number":318,"utf16_col":0}}},{"name":"D. Merging and Resolving Conflicts:","kind":"section_3","ident_start":13957,"ident_end":13992,"extent_start":13953,"extent_end":14857,"fully_qualified_name":"D. Merging and Resolving Conflicts:","ident_utf16":{"start":{"line_number":318,"utf16_col":4},"end":{"line_number":318,"utf16_col":39}},"extent_utf16":{"start":{"line_number":318,"utf16_col":0},"end":{"line_number":334,"utf16_col":0}}},{"name":"IV. Additional Features (2 minutes)","kind":"section_2","ident_start":14860,"ident_end":14895,"extent_start":14857,"extent_end":16086,"fully_qualified_name":"IV. Additional Features (2 minutes)","ident_utf16":{"start":{"line_number":334,"utf16_col":3},"end":{"line_number":334,"utf16_col":38}},"extent_utf16":{"start":{"line_number":334,"utf16_col":0},"end":{"line_number":359,"utf16_col":0}}},{"name":"A. Issues and Project Management:","kind":"section_3","ident_start":14901,"ident_end":14934,"extent_start":14897,"extent_end":15470,"fully_qualified_name":"A. Issues and Project Management:","ident_utf16":{"start":{"line_number":336,"utf16_col":4},"end":{"line_number":336,"utf16_col":37}},"extent_utf16":{"start":{"line_number":336,"utf16_col":0},"end":{"line_number":347,"utf16_col":0}}},{"name":"B. GitHub Pages:","kind":"section_3","ident_start":15474,"ident_end":15490,"extent_start":15470,"extent_end":16086,"fully_qualified_name":"B. GitHub Pages:","ident_utf16":{"start":{"line_number":347,"utf16_col":4},"end":{"line_number":347,"utf16_col":20}},"extent_utf16":{"start":{"line_number":347,"utf16_col":0},"end":{"line_number":359,"utf16_col":0}}},{"name":"V. Conclusion (2 minutes)","kind":"section_2","ident_start":16089,"ident_end":16114,"extent_start":16086,"extent_end":17494,"fully_qualified_name":"V. Conclusion (2 minutes)","ident_utf16":{"start":{"line_number":359,"utf16_col":3},"end":{"line_number":359,"utf16_col":28}},"extent_utf16":{"start":{"line_number":359,"utf16_col":0},"end":{"line_number":389,"utf16_col":0}}},{"name":"A. Recap of the essentials of GitHub:","kind":"section_3","ident_start":16120,"ident_end":16157,"extent_start":16116,"extent_end":16499,"fully_qualified_name":"A. Recap of the essentials of GitHub:","ident_utf16":{"start":{"line_number":361,"utf16_col":4},"end":{"line_number":361,"utf16_col":41}},"extent_utf16":{"start":{"line_number":361,"utf16_col":0},"end":{"line_number":369,"utf16_col":0}}},{"name":"B. Encourage further exploration and learning:","kind":"section_3","ident_start":16503,"ident_end":16549,"extent_start":16499,"extent_end":16936,"fully_qualified_name":"B. Encourage further exploration and learning:","ident_utf16":{"start":{"line_number":369,"utf16_col":4},"end":{"line_number":369,"utf16_col":50}},"extent_utf16":{"start":{"line_number":369,"utf16_col":0},"end":{"line_number":378,"utf16_col":0}}},{"name":"C. Share resources for learning more about GitHub:","kind":"section_3","ident_start":16940,"ident_end":16990,"extent_start":16936,"extent_end":17494,"fully_qualified_name":"C. Share resources for learning more about GitHub:","ident_utf16":{"start":{"line_number":378,"utf16_col":4},"end":{"line_number":378,"utf16_col":54}},"extent_utf16":{"start":{"line_number":378,"utf16_col":0},"end":{"line_number":389,"utf16_col":0}}},{"name":"V. Conclusion (2 minutes)","kind":"section_2","ident_start":17497,"ident_end":17522,"extent_start":17494,"extent_end":18901,"fully_qualified_name":"V. Conclusion (2 minutes)","ident_utf16":{"start":{"line_number":389,"utf16_col":3},"end":{"line_number":389,"utf16_col":28}},"extent_utf16":{"start":{"line_number":389,"utf16_col":0},"end":{"line_number":418,"utf16_col":0}}},{"name":"A. Recap of the essentials of GitHub:","kind":"section_3","ident_start":17528,"ident_end":17565,"extent_start":17524,"extent_end":17907,"fully_qualified_name":"A. Recap of the essentials of GitHub:","ident_utf16":{"start":{"line_number":391,"utf16_col":4},"end":{"line_number":391,"utf16_col":41}},"extent_utf16":{"start":{"line_number":391,"utf16_col":0},"end":{"line_number":399,"utf16_col":0}}},{"name":"B. Encourage further exploration and learning:","kind":"section_3","ident_start":17911,"ident_end":17957,"extent_start":17907,"extent_end":18344,"fully_qualified_name":"B. Encourage further exploration and learning:","ident_utf16":{"start":{"line_number":399,"utf16_col":4},"end":{"line_number":399,"utf16_col":50}},"extent_utf16":{"start":{"line_number":399,"utf16_col":0},"end":{"line_number":408,"utf16_col":0}}},{"name":"C. Share resources for learning more about GitHub:","kind":"section_3","ident_start":18348,"ident_end":18398,"extent_start":18344,"extent_end":18901,"fully_qualified_name":"C. Share resources for learning more about GitHub:","ident_utf16":{"start":{"line_number":408,"utf16_col":4},"end":{"line_number":408,"utf16_col":54}},"extent_utf16":{"start":{"line_number":408,"utf16_col":0},"end":{"line_number":418,"utf16_col":0}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/CU-ESIIL/hackathon2023_datacube/branches":{"post":"4SnG9LwB2-Z2FniG97KhFzzFr1xsUMEFsQBAI-7Kn16khb1Tlay41zXr5s8r2_XrSijYc3yXUNI2MKR-4Fyi3Q"},"/repos/preferences":{"post":"m-F1bHb87Nnk7cBJwkS5oVLQj6f1w_vRU3If13QsDnxT9pt_aAI3Re_K16UDGa29gLrkb9rqQufGZzgK-a2_gw"}}},"title":"hackathon2023_datacube/docs/1_GIT_on_the_Cloud/github_lesson.md at main · CU-ESIIL/hackathon2023_datacube"} \ No newline at end of file +Github essentials +================ + +## I. Introduction (2 minutes) + +### A. Brief overview of GitHub: + +GitHub is a web-based platform that provides version control and +collaboration features using Git, a distributed version control system. +It enables developers to work together on projects, track changes to +code, and efficiently manage different versions of the project. GitHub +is widely used in the software development industry and is an essential +tool for collaborative projects and maintaining code quality. + +### B. Introduce GitHub Desktop and JupyterHub GitHub widget: + +GitHub Desktop is a graphical user interface (GUI) application that +simplifies working with Git and GitHub by providing a more visual and +intuitive way to manage repositories, branches, commits, and other Git +features. JupyterHub GitHub widget, on the other hand, is a built-in +widget that integrates Git and GitHub functionality directly into +Jupyter notebooks, allowing users to perform version control and +collaboration tasks within the Jupyter environment. Both tools help +streamline the process of working with GitHub and make it more +accessible to users with varying levels of experience with Git and +version control. + +#### 1. Download GitHub Desktop + +##### Step 1: Download GitHub Desktop + +Go to the GitHub Desktop download page: https://desktop.github.com/ + +Click on the “Download for Windows” or “Download for macOS” button, +depending on your operating system. The download should start +automatically. + +##### Step 2: Install GitHub Desktop + +For Windows: + +Locate the downloaded installer file (usually in the Downloads folder) +and double-click on it to run the installer. + +Follow the installation instructions that appear on the screen, +accepting the default settings or customizing them as desired. + +Once the installation is complete, GitHub Desktop will launch +automatically. For macOS: + +Locate the downloaded .zip file (usually in the Downloads folder) and +double-click on it to extract the GitHub Desktop application. + +Drag the extracted “GitHub Desktop” application into the “Applications” +folder. + +Open the “Applications” folder and double-click on “GitHub Desktop” to +launch the application. + +##### Step 3: Set up GitHub Desktop + +When GitHub Desktop launches for the first time, you will be prompted to +sign in with your GitHub account. If you don’t have one, you can create +one at https://github.com/join. + +Enter your GitHub username (or email) and password, and click on “Sign +in.” + +You will then be prompted to configure Git. Enter your name and email +address, which will be used for your commit messages. Click “Continue” +when you’re done. Choose whether you want to submit usage data to help +improve GitHub Desktop. Click “Finish” to complete the setup. + +Now, you have successfully installed and set up GitHub Desktop. You can +start using it to clone repositories, make changes, commit, and sync +with the remote repositories on GitHub. + +#### 1. Download GitHub for JupyterHub cloud service + +### Step 1: Accessing JupyterHub on the cloud + +Visit the JupyterHub cloud service you want to use (e.g., Binder, Google +Colab, or a custom JupyterHub deployment provided by your organization). + +Sign in with your credentials or authenticate using a third-party +service if required. + +### Step 2: Launch a new Jupyter Notebook or open an existing one + +Click on the “New” button (usually located in the top right corner) and +select “Python” to create a new Jupyter Notebook or open an existing one +from the file browser. + +Once the notebook is open, you will see the Jupyter Notebook interface +with the familiar cells for writing and executing code. + +### Step 3: Install and enable the JupyterLab Git extension + +In your Jupyter Notebook, create a new code cell and run the following +command to install the JupyterLab Git extension: + +!pip install jupyterlab-git + +Restart the Jupyter Notebook server for the changes to take effect. + +### Step 4: Using the JupyterHub GitHub widget + +In the Jupyter Notebook interface, you should now see a Git icon on the +left sidebar. Click on it to open the GitHub widget. + +To clone a repository, click on the “+” icon in the GitHub widget and +enter the repository URL. This will clone the repository into your +JupyterHub workspace. You can now navigate through the cloned +repository, make changes, and use the GitHub widget to stage, commit, +and push your changes back to the remote repository. + +To create and manage branches, use the branch icon in the GitHub widget. +You can create new branches, switch between branches, and merge branches +using this interface. + +To sync your local repository with the remote repository, use the “Pull” +and “Push” buttons in the GitHub widget. + +Now, you know how to access and use the JupyterHub GitHub widget running +on the cloud. This allows you to work with Git and GitHub directly from +your Jupyter Notebook interface, streamlining your workflow and making +collaboration easier. + +### C. GitHub in Rstudio: + +Integrating GitHub with RStudio allows users to manage their Git +repositories and collaborate on projects directly within the RStudio +environment. It offers similar functionality to GitHub Desktop but +caters specifically to R users working within RStudio. By configuring +RStudio to work with Git, creating or opening RStudio projects, and +linking projects to GitHub repositories, users can enjoy a seamless +workflow for version control and collaboration. RStudio’s Git pane +enables users to stage, commit, and push changes to remote repositories, +as well as manage branches and sync local repositories with remote ones, +providing a comprehensive solution for R developers working with GitHub. + +#### Step 1: Install Git + +Before integrating GitHub with RStudio, you need to have Git installed +on your computer. Visit the official Git website (https://git-scm.com/) +to download and install the latest version of Git for your operating +system. + +#### Step 2: Configure RStudio to work with Git + +Open RStudio. + +Go to “Tools” \> “Global Options” in the top menu. In the “Global +Options” window, click on the “Git/SVN” tab. + +Check that the “Git executable” field is pointing to the correct +location of the installed Git. If not, click “Browse” and navigate to +the location of the Git executable file (usually found in the “bin” +folder of the Git installation directory). + +Click “OK” to save the changes. + +#### Step 3: Create or open an RStudio project + +To create a new RStudio project, go to “File” \> “New Project” in the +top menu. You can either create a new directory or choose an existing +one for your project. + +To open an existing RStudio project, go to “File” \> “Open Project” and +navigate to the project’s “.Rproj” file. + +#### Step 4: Link your RStudio project to a GitHub repository + +In the RStudio project, go to the “Tools” menu and select “Version +Control” \> “Project Setup.” + +In the “Project Setup” window, select “Git” as the version control +system and click “OK.” + +A new “.git” folder will be created in your project directory, +initializing it as a Git repository. Commit any changes you have made so +far by clicking on the “Commit” button in the “Git” pane in RStudio. + +To link your local repository to a remote GitHub repository, go to your +GitHub account and create a new repository. + +Copy the remote repository’s URL (e.g., +“https://github.com/username/repository.git”). + +In RStudio, open the “Shell” by going to “Tools” \> “Shell.” + +In the shell, run the following command to add the remote repository: + +git remote add origin https://github.com/username/repository.git + +Replace the URL with the one you copied from your GitHub repository. + +Push your changes to the remote repository by running the following +command in the shell: + +git push -u origin master + +Now, your RStudio project is linked to a GitHub repository. You can use +the “Git” pane in RStudio to stage, commit, and push changes to the +remote repository, as well as manage branches and sync your local +repository with the remote one. + +By integrating GitHub with RStudio, you can streamline your workflow, +collaborate more effectively with your team, and manage your Git +repositories directly from the RStudio interface. + +## II. GitHub Basics (4 minutes) + +### A. Repository: + +A repository, often abbreviated as “repo,” is the fundamental building +block of GitHub. It is a storage space for your project files, including +the code, documentation, and other related resources. Each repository +also contains the complete history of all changes made to the project +files, which is crucial for effective version control. Repositories can +be public, allowing anyone to access and contribute, or private, +restricting access to specific collaborators. + +### B. Fork and Clone: + +Forking and cloning are two essential operations for working with +repositories on GitHub. Forking creates a personal copy of someone +else’s repository under your GitHub account, enabling you to make +changes to the project without affecting the original repo. Cloning, on +the other hand, is the process of downloading a remote repository to +your local machine for offline development. In GitHub Desktop, you can +clone a repository by selecting “Clone a repository from the Internet” +and entering the repository URL. In JupyterHub GitHub widget, you can +clone a repository by entering the repo URL in the “Clone Repository” +section of the widget. + +### C. Branches: + +Branches are a critical aspect of Git version control, as they allow you +to create multiple parallel versions of your project within a single +repository. This is particularly useful when working on new features or +bug fixes, as it prevents changes from interfering with the main (or +“master”) branch until they are ready to be merged. Creating a new +branch in GitHub Desktop can be done by clicking the “Current Branch” +dropdown and selecting “New Branch.” In JupyterHub GitHub widget, you +can create a new branch by clicking the “New Branch” button in the +“Branches” section of the widget. + +### D. Replace ‘master’ with ‘main’: + +In recent years, there has been a growing awareness of the importance of +inclusive language in technology. One such example is the use of the +term “master” in the context of the default branch in a GitHub +repository. The term “master” has historical connections to the +“master/slave” file structure, which evokes an unsavory colonial past +associated with slavery. In light of this, many developers and +organizations have begun to replace the term “master” with more neutral +terms, such as “main.” We encourage you to follow this practice and +change the default branch name in your repositories from “master” to +“main” or another suitable alternative. This small change can help +promote a more inclusive and welcoming environment within the technology +community. + +## III. Collaboration and Version Control (5 minutes) + +### A. Commits: + +Commits are snapshots of your project’s changes at a specific point in +time, serving as the fundamental building blocks of Git’s version +control system. Commits make it possible to track changes, revert to +previous versions, and collaborate with others. In GitHub Desktop, you +can make a commit by staging the changes you want to include, adding a +descriptive commit message, and clicking “Commit to \[branch_name\].” In +JupyterHub GitHub widget, you can create a commit by selecting the files +with changes, entering a commit message, and clicking the “Commit” +button. + +### B. Push: + +In GitHub, “push” is a fundamental operation in the version control +process that transfers commits from your local repository to a remote +repository, such as the one hosted on GitHub. When you push changes, you +synchronize the remote repository with the latest updates made to your +local repository, making those changes accessible to other collaborators +working on the same project. This operation ensures that the remote +repository reflects the most recent state of your work and allows your +team members to stay up to date with your changes. Pushing is an +essential step in distributed version control systems like Git, as it +promotes efficient collaboration among multiple contributors and +provides a centralized location for tracking the project’s history and +progress. + +In GitHub, the concepts of “commit” and “push” represent two distinct +steps in the version control process. A “commit” is the action of saving +changes to your local repository. When you commit changes, you create a +snapshot of your work, accompanied by a unique identifier and an +optional descriptive message. Commits allow you to track the progress of +your work over time and make it easy to revert to a previous state if +necessary. On the other hand, “push” is the action of transferring your +local commits to a remote repository, such as the one hosted on GitHub. +Pushing makes your changes accessible to others collaborating on the +same project and ensures that the remote repository stays up to date +with your local repository. In summary, committing saves changes +locally, while pushing synchronizes those changes with a remote +repository, allowing for seamless collaboration among multiple +contributors. + +### C. Pull Requests: + +Pull requests are a collaboration feature on GitHub that enables +developers to propose changes to a repository, discuss those changes, +and ultimately merge them into the main branch. To create a pull +request, you must first push your changes to a branch on your fork of +the repository. Then, using either GitHub Desktop or JupyterHub GitHub +widget, you can navigate to the original repository, click the “Pull +Request” tab, and create a new pull request. After the pull request is +reviewed and approved, it can be merged into the main branch. + +### D. Merging and Resolving Conflicts: + +Merging is the process of combining changes from one branch into +another. This is typically done when a feature or bugfix has been +completed and is ready to be integrated into the main branch. Conflicts +can arise during the merging process if the same lines of code have been +modified in both branches. To resolve conflicts, you must manually +review the changes and decide which version to keep. In GitHub Desktop, +you can merge branches by selecting the target branch and choosing +“Merge into Current Branch.” Conflicts will be highlighted, and you can +edit the files to resolve them before committing the changes. In +JupyterHub GitHub widget, you can merge branches by selecting the target +branch in the “Branches” section and clicking the “Merge” button. If +conflicts occur, the widget will prompt you to resolve them before +completing the merge. + +## IV. Additional Features (2 minutes) + +### A. Issues and Project Management: + +Issues are a powerful feature in GitHub that allows developers to track +and manage bugs, enhancements, and other tasks within a project. Issues +can be assigned to collaborators, labeled for easy organization, and +linked to specific commits or pull requests. They provide a centralized +location for discussing and addressing project-related concerns, +fostering collaboration and transparent communication among team +members. Using issues effectively can significantly improve the overall +management and organization of your projects. + +### B. GitHub Pages: + +GitHub Pages is a service offered by GitHub that allows you to host +static websites directly from a repository. By creating a new branch +named “gh-pages” in your repository and adding the necessary files +(HTML, CSS, JavaScript, etc.), GitHub will automatically build and +deploy your website to a publicly accessible URL. This is particularly +useful for showcasing project documentation, creating personal +portfolios, or hosting project demos. With GitHub Pages, you can take +advantage of the version control and collaboration features of GitHub +while easily sharing your work with others. + +## V. Conclusion (2 minutes) + +### A. Recap of the essentials of GitHub: + +In this brief introduction, we have covered the essentials of GitHub, +including the basics of repositories, forking, cloning, branching, +commits, pull requests, merging, and resolving conflicts. We have also +discussed additional features like issues for project management and +GitHub Pages for hosting websites directly from a repository. + +### B. Encourage further exploration and learning: + +While this introduction provides a solid foundation for understanding +and using GitHub, there is still much more to learn and explore. As you +continue to use GitHub in your projects, you will discover new features +and workflows that can enhance your productivity and collaboration. We +encourage you to dive deeper into the platform and experiment with +different tools and techniques. + +### C. Share resources for learning more about GitHub: + +There are many resources available for learning more about GitHub and +expanding your skills. Some popular resources include GitHub Guides +(https://guides.github.com/), which offers a collection of tutorials and +best practices, the official GitHub documentation +(https://docs.github.com/), and various online tutorials and courses. By +engaging with these resources and participating in the GitHub community, +you can further develop your understanding of the platform and become a +more proficient user. + +## V. Conclusion (2 minutes) + +### A. Recap of the essentials of GitHub: + +In this brief introduction, we have covered the essentials of GitHub, +including the basics of repositories, forking, cloning, branching, +commits, pull requests, merging, and resolving conflicts. We have also +discussed additional features like issues for project management and +GitHub Pages for hosting websites directly from a repository. + +### B. Encourage further exploration and learning: + +While this introduction provides a solid foundation for understanding +and using GitHub, there is still much more to learn and explore. As you +continue to use GitHub in your projects, you will discover new features +and workflows that can enhance your productivity and collaboration. We +encourage you to dive deeper into the platform and experiment with +different tools and techniques. + +### C. Share resources for learning more about GitHub: + +There are many resources available for learning more about GitHub and +expanding your skills. Some popular resources include GitHub Guides +(https://guides.github.com/), which offers a collection of tutorials and +best practices, the official GitHub documentation +(https://docs.github.com/), and various online tutorials and courses. By +engaging with these resources and participating in the GitHub community, +you can further develop your understanding of the platform and become a +more proficient user.