Playing with GitHub¶
A few weeks ago, you made a GitHub account and published your personal webpage. Today, we will practice collaborating on GitHub. Today's goals are:
- Explain the advantages of collaborating with git and GitHub
- Practice creating pull requests two ways
- Identify some common git/GitHub pitfalls to avoid
Today's agenda is:
Time | Activity |
---|---|
10:00-10:10 | Welcome, and send us your |
10:10-10:20 | REVIEW: Practice authenticating and cloning a GitHub repository in a Cyverse analysis. |
10:20-10:30 | Collaborating on GitHub: Forks, branches, checkouts, and pull requests. |
10:30-10:50 | Using forks and pull requests, collaborate on the Home Towns tabular data file. |
10:50-11:00 | DEMO: reviewing and merging pull requests |
11:00-11:10 | BREAK |
11:10-11:30 | Using branches and pull requests, edit the HYR-SENSE website to add a link to your portfolio. |
11:30-11:40 | Pull and check out - look at each other's work |
11:40-12:00 | Review other students' Pull Requests on GitHub. |
Activity 1: Home Towns¶
In this activity, you will practice:
- Forking a repository on GitHub
- Cloning your fork to Cyverse
- Modifying a tabular data file (CSV) with information about a significant place
- Adding, committing, and pushing your data back to GitHub
- Creating a Pull Request back to the main repository
You can find full instructions for this activity in the ESIIL Data Short Course forking activity
Activity 2: Contribute to the HYR-SENSE website¶
In this activity, you will practice:
- Cloning the HYR-SENSE repository to Cyverse
- Creating a new branch as a collaborator
- Adding your webpage link to the HYR-SENSE website
- Adding, committing, and pushing your changes back to GitHub
- Creating a Pull Request to the main branch
You can find full instructions for this activity in the ESIIL Data Short Course branch activity
Some common git/GitHub problems you may encounter¶
During today's activities, we will also touch on the following common git/GitHub snafus, and how to fix them:
- Triple check everything: the add-commit-push workflow
- Add before you commit
- Writing descriptive commit messages
- Syncing with your team on GitHub
- Large files: ignore data files and clear outputs
- How do you know it worked? Demystifying git status
- Identifying and some basic approaches to merge conflicts
Last update:
2024-06-14