https://github.com/flatironinstitute/learn-sciware-dev/tree/master/15_IntroGithub
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
- Avoid discussions between a few people on a narrow topic
- Provide time for people who haven't spoken to speak/ask questions
- Provide time for experts to share wisdom and discuss
- Work together to make discussions accessible to novices
- If comfortable, please keep video on so we can all see each other's faces.
- Ok to break in for quick, clarifying questions.
- Use Raise Hand feature for new topics or for more in-depth questions.
- Please stay muted if not speaking. (Host may mute you.)
- We are recording. Link will be posted on #sciware Slack.
- July 8: Intro to IDEs and Debugging
- Suggest topics and vote on options in #sciware Slack
- When we want to make changes separately from a main project
- We want to take an existing project in a new direction
- Sometimes we want to make and track changes to repositories we don't have permissions to push to
- Fork and clone the project
- Add the code and push to your fork
- Merge code into the main project
- Keep your fork up to date
➜ git clone git@github.com:your_user_name/sciware15-git-intro.git
If you already have a copy of this repo from yesterday's workshop, that's ok, keep it!
➜ git remote -v
origin git@github.com:flatironinstitute/sciware15-git-intro.git (fetch)
origin git@github.com:flatironinstitute/sciware15-git-intro.git (push)
➜ git remote rename origin upstream
➜ git remote add origin git@github.com:jamesETsmith/sciware15-git-intro.git
➜ git remote -v
origin git@github.com:jamesETsmith/sciware15-git-intro.git (fetch)
origin git@github.com:jamesETsmith/sciware15-git-intro.git (push)
upstream git@github.com:flatironinstitute/sciware15-git-intro.git (fetch)
upstream git@github.com:flatironinstitute/sciware15-git-intro.git (push)
Add a file in student_info called firstName_lastName.csv with the following info:
- Your full name
- Your center
- Your research focus
- A fun fact
Mine looks like this:
Name,Center,Research Focus, Fun Fact
James Smith, CCQ, Quantum Chemistry, My initials are JETS
- Run
git addon your file - Commit it
- Push to your fork
Mine looks like this:
➜ git status
...
➜ git add student_info/james_smith.csv
➜ git commit -m "Adding info for James Smith"
...
➜ git push origin main
- Using your browser, navigate to your forked repository
- It should look something like this:
- Click on the
Contributebutton
- Click on the
Open pull requestbutton
Things to think about when making pull requests (PR):
- Many projects have PR templates with information you need to fill out, use them!
- Include why you're making the PR, what steps you took, and how it addresses a current problem.
- Bug reports should always include a minimum working example.
- PRs (and Issues) are a valuable public record, just like StackOverflow.
If the original repo from flatironinstitute isn't your upstream, set it now and then pull from it.
If the original repo from flatironinstitute isn't your upstream, set it now and then pull from it.
➜ git remote -v
origin git@github.com:jamesETsmith/sciware15-git-intro.git (fetch)
origin git@github.com:jamesETsmith/sciware15-git-intro.git (push)
➜ git remote add upstream git@github.com:flatironinstitute/sciware15-git-intro.git
➜ git remote -v
origin git@github.com:jamesETsmith/sciware15-git-intro.git (fetch)
origin git@github.com:jamesETsmith/sciware15-git-intro.git (push)
upstream git@github.com:flatironinstitute/sciware15-git-intro.git (fetch)
upstream git@github.com:flatironinstitute/sciware15-git-intro.git (push)
➜ git pull upstream main
As other students make PRs, go to the pull requests tab on GitHub.
As other students 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 + sybmol.
Here's an example of a PR without a helpful description:
Here's an example of a PR with a helpful description:
Check out and bookmark these tutorials for more information about git and the forking workflow:













