Welcome to IPA`s Git Learning Lab! 😄
Here is the agenda that we are following for the Learning Lab:
Learning Objective: to become familiar with the value of git and GitHub for version control and peer review
Motivation: at IPA we are increasingly using Git for version control for research and data science projects, software development (e.g. Stata programs), and knowledge sharing (e.g. the Research and Data Science Knowledge Hub). We want to make sure that a wide set of colleagues are able to collaborate on these resources and know how to utilize Git and GitHub for version control and peer review.
- Git is a valuable tool for managing version control of source code (e.g. Stata, Python, R)
- GitHub is an online resource for managing source code (and in some cases deploying code to websites, databases, and other online/cloud infrastructure)
- The goal is for YOU to learn git, you don't need to become an expert
- Another goal is for US to be more collaborative in learning and sharing
- You will likely run into challenges. git is very valuable, but can be hard
- Go through the materials, practice, practice, practice
- You are not alone
- Be proactive in sharing what you learn
- Ask questions
- Help others answer their questions
- Use Huddles, Google Meet, or Zoom to interact with colleagues. Or pair with a colleague in person...but remember to share out if you pair in person.
Focus: get set up with GitHub, git, and (optionally) VS Code
- Create a GitHub account (if you don't already have one)
- Request to be added to IPA's GitHub org (if you aren't already)
- Install Git, GitHub Desktop, and Visual Studio Code
- Git for Windows https://gitforwindows.org/
- GitHub Desktop https://github.com/apps/desktop
- VS Code https://code.visualstudio.com/download
- Alternatively, if you use winget (the Windows package manager) from a command terminal you can run the following to install all three programs
winget install Git.Git GitHub.GitHubDesktop Microsoft.VisualStudioCode
- Getting Started
- Getting Ready for Class
- Getting Started
- GitHub Flow
- Optional: Getting Started with GitHub Desktop
- Read: About Git
- Watch:
https://youtu.be/r8jQ9hVA2qs?si=PRA_v74lv0hGv5qr
- GitHub for Developers Project 1: Caption This
- Branching with Git
- Local Git Configs
- Working Locally
- Collaborating on Code
- Editing on GitHub
- Merging Pull Requests
- Review grds-python-template repository
- GitHub for Developers Project 2: Merge Conflicts
- Defining a merge conflict
- Resolving merge conflicts
- GitHub Learning - Introduction to GitHub (Complete the tasks described in the repository)
- Optional
- Communicate using Markdown
- Introducing the Command Line Basics
- Introduction to Markdown
- Basic formatting syntax
- GitHub for Beginners YouTube playlist
- Git Cheatsheet
- All about pull request reviews
- About merge conflicts
Focus - become familiar and comfortable with peer reviews (pull requests on GitHub) as well as how to resolve merge conflicts
- Consider using GitHub Desktop or VS Code
- GitHub Desktop
- Getting Started with GitHub Desktop
- Using Github Desktop video
- Git with VS Code
- Using Git source control in VS Code
- Introduction to Git in VS Code
- Working with GitHub in VS Code
- GitHub Desktop
- Read: Creating a pull request
- Watch:
https://youtu.be/nCKdihvneS0?si=yFM30q-_xO6vvTme
- GitHub for Developers Project 3: GitHub Games
- Workflow Review
- Protected branches & code owners
- Reverting commits
- Helpful Git Commands
- GitHub for Developers Project 4: Local Repository
- Create a Local Repo
- Fixing commit mistakes
- Forgot to branch
- Rewriting history with Git reset
- Cherry picking
- Merge strategies
-
GitHub Learning - Review Pull Requests (Follow steps outlined in the repository)
-
Optional:
- GitHub Learning - Resolve a Merge Conflict
-
Bonus (if you have time):
* Create at least one pull request to an IPA repository * Complete at least one review of a team member's pull request * Some ideas for repositories to contribute to: * https://github.com/PovertyAction/grds-python-template * https://github.com/PovertyAction/ipa-research-data-science-hub * https://github.com/PovertyAction/Python-Resources * https://github.com/PovertyAction/ipahelper
- Getting out of trouble, by Miles McBain
- Git best practices, by Seth Robertson
- Good practice for pull requests and peer reviews
- How to write the perfect pull request, by GitHub
- Written unwritten guide to pull requests, by Atlassian