Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lab 2 #1

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .ipynb_checkpoints/Getting Started - GitHub-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "9d89079c",
"metadata": {},
"source": [
"# Getting Started with GitHub\n",
"\n",
"The first step is to download Git. Known as *the* open source version control system, Git is a software designed to help groups of people work together on the same code efficiently and effectively. To get started, if you haven't already, download git at https://git-scm.com/book/en/v2/Getting-Started-Installing-Git. Alternatively, GitHub also has a friendlier interface known as GitHub Desktop which will allow you to use Git without have to work through a terminal. https://desktop.github.com/\n",
"\n",
"\n",
"\n",
"Next you'll create a personal GitHub account which you can do at https://github.com/. Once your account is set up you can create a repository by clicking on the button that says ***New*** repositories on the website. (Note that you can also create repositories by using the Desktop app). You should then name your repository with your name and a descriptor for this class because you will be using this repository to share your codes with the instructor and the grader. e.g. John-Doe-QC-Homework. Initialize a README markdown file and feel free to add a description and choose whether to make it public or private. \n",
"<blockquote>\n",
"If you choose to make it private, make sure the instructors have access as collaborators on the repository. After you press create repository, search for the settings tab within the GitHub view of your repository. The manage access page will allow you to share access to this directory with select individuals. Invite Matt (<b>mm052118</b>) and Kaelyn (<b>kaelynj</b>) so that they can view your code. \n",
"</blockquote>\n",
"\n",
"***\n",
"\n",
"GitHub keeps track of your projects through a system of **commits**, a snapshot of all of the changes you've made to a project (adding/deleting files, making changes to your code, etc.) at particular points in time. Once changes are committed locally on your machine, you can then **push** your commit to your github repository where those changes will be stored online.\n",
"\n",
"Test out this process by first cloning your new repository to your machine, making some changes to the README.md file and creating a commit using either the command line or desktop app.\n"
]
},
{
"cell_type": "markdown",
"id": "235e7035",
"metadata": {},
"source": [
"First clone your repository in the desktop app from the lefthand menu *Current Repository* and click *Add* where you'll be prompted to specify the repo either through your account or by a specific url. On the terminal the command to clone is:\n",
"\n",
"``$~ git clone https://your/repo/url/here``"
]
},
{
"cell_type": "markdown",
"id": "64fd51f0",
"metadata": {},
"source": [
"![Step 1](./img/GithubDesktop-Step1.png)"
]
},
{
"cell_type": "markdown",
"id": "50b71926",
"metadata": {},
"source": [
"Next make some changes to your README.md file and commit them with a commit message describing the changes you've made. On the terminal you can commit the whole project directory via:\n",
"\n",
"```$~ git add *```\n",
"\n",
"```$~ git commit```"
]
},
{
"cell_type": "markdown",
"id": "e81765ae",
"metadata": {},
"source": [
"![Step 2](./img/GithubDesktop-Step2.PNG)"
]
},
{
"cell_type": "markdown",
"id": "3e8b02ba",
"metadata": {},
"source": [
"Now that you have commited the changes, you can then push them to the remote repository which lives on your github profile. The terminal command for this is, perhaps unsurprisingly\n",
"\n",
"```$~ git push```"
]
},
{
"cell_type": "markdown",
"id": "b7237710",
"metadata": {},
"source": [
"![Step 3](./img/GithubDesktop-Step3.PNG)"
]
},
{
"cell_type": "markdown",
"id": "b44fa2e2",
"metadata": {},
"source": [
"Now you know the barebones essentials of how we'll be using git. To submit the lab assignments you'll need to update your repository with jupyter notebooks completing each lab by the due date.\n",
"\n",
"To get started with the labs, clone the repository here: <a href=\"https://github.com/kaelynj/PHYS-7403\"> https://github.com/kaelynj/PHYS-7403</a>"
]
},
{
"cell_type": "markdown",
"id": "1a8f8e76",
"metadata": {},
"source": [
"***\n",
"There is also plenty more functionality to git and github which we have not covered here. Git is a powerful tool (and helpful in a pinch after you've accidentally broken your code) and has many different features including branching, pull requests, and merging, among others. We haven't gone into detail on what else you can do with git, but there are plenty of tutorials out there in case you become curious.\n",
"\n",
"https://docs.github.com/en/get-started\n",
"https://product.hubspot.com/blog/git-and-github-tutorial-for-beginners\n",
"https://learngitbranching.js.org/"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading