Using GitHub on a Pair Programming Project
When my journey to learn software development began I envisioned sitting alone in my mom's basement in the dark. The truth is, I had no idea how much teamwork and pair programming would be involved in my new career. As someone who loves collaborating I love working with teams. I am a firm believer that two heads are always better than one.
Now here comes the "but"....
![]() Work Hug GIF By Kochstrasse™ |
I knew very little about collaborating on Github as I embarked on my first pair programming project. Here's what I wish I knew:
Getting Started
Create your repo a.k.a. repository in Github
1 > Settings
2 > Collaborators
3 > Add People
Get the Github desktop app
You might be thinking "oh jeez, I don't want to install yet another app" but I promise it will make your life easier.
Add your repository to Github desktop
Open your code editor to update your code
You'll automatically be on the main (or master) branch. You can find your current branch in the bottom left corner of VS Code.
Be careful on this branch!
Back in Github desktop you can see your changes
> Add a summary and description.
> Commit to main
You will be re-directed to Github to merge your changes (if you wish).
Or, you can stash them for later if you have functionality you are not yet ready to merge with the main branch.
On your repository you will find a section header for Pull requests.
Now comes the fun part. Work with your teammate to decide if you will have responsibility to merge your changes or if your teammate wants to be able to review your changes before merging with the main branch. It's up to you to decide as a team! No matter how you divvy up responsibilities on your next pair programming project I sure hope you have fun doing it now that you know how easy it is to
> create a new branch
> commit changes
> stash changes
> merge your changes
... and repeat!

Comments
Post a Comment