https://sciware.flatironinstitute.org/33_SummerIntro
Activities where participants all actively work to foster an environment which encourages participation across experience levels, coding language fluency, technology choices*, and scientific disciplines.
*though sometimes we try to expand your options
Previous sciwares available here https://sciware.flatironinstitute.org
Password for videos is…
> mv sciware33-git-intro/ sciware33-git-intro-day1/
<img width=80% src=”./assets/Learn-Git-Graphics/Forking%20a%20Repo.png”>
First we need to fork the repo
https://github.com/flatironinstitute/sciware33-git-intro
<img width=80% src=”./assets/Learn-Git-Graphics/Clone%20the%20Fork.png”>
Next, we clone our fork of the repo:
> git clone git@github.com:your_user_name/sciware33-git-intro.git
student_info/
directory called firstName_lastName.csv
with the following info:
> cd student_info/
> nano
Example contents of robert_blackwell.csv
:
Name,Center,Research Focus,Fun Fact
Robert Blackwell,SCC,high performance computing,violin!
Save the file.
<img width=80% src=”./assets/Learn-Git-Graphics/Push%20to%20the%20Fork.png”>
> git status
> git add student_info/robert_blackwell.csv
> git commit -m "Adding info for Robert Blacwell"
> git push origin main
Contribute
buttonOpen pull request
buttonHere’s an example of a PR without a helpful description:
Here’s an example of a PR with a helpful description:
<img height=70% width=60% src=”./assets/pr_case_study_good.png”>
Things to think about when making pull requests (PR):
Finish up your pull request and click “Create Pull Request”
Someone else will merge your PR.
In practice, someone might leave comments on your PR and/or request changes before merging.
As other folks make PRs, go to the pull requests tab on GitHub.
Choose another student’s PR and click on it.
Click on the commit to see the diff of their changes and hover over a line until you see the +
symbol.
<img width=80% src=”./assets/fetch-upstream-3.png”>
Sync.
<img width=80% src=”./assets/fetch-upstream-1.png”>
Sync.
<img width=80% src=”./assets/fetch-upstream-4.png”>
> git pull origin main
Confirm that you have the changes locally.
> git log
> ls student_info/
git checkout
can be used to switch branches> git branch -v
> git checkout -b newbranch
> git branch -v
> git checkout main
git checkout newbranch
git push origin newbranch
newbranch
into main
> git branch -v
> git checkout main
> git merge newbranch
> git push origin main
Check your new PR!
Check out and bookmark these tutorials for more information about git and the forking workflow: