Forks and Pull Requests: How to Contribute to Github Repos

Forks and Pull Requests: How to Contribute to Github Repos

I recently worked with a team that was lacking a bit of documentation, so I took it upon myself to create some. In the process, I gained sympathy for authors of documentation. Documentation can often seem incomprehensible, and that’s in part because when you write documentation, you have to assume your audience has some baseline level of knowledge.

I recently worked with a team that was lacking a bit of documentation, so I took it upon myself to create some. In the process, I gained sympathy for authors of documentation. Documentation can often seem incomprehensible, and that’s in part because when you write documentation, you have to assume your audience has some baseline level of knowledge. We can all agree, your project’s README isn’t the place to explain if/else statements! So I wrote some documentation outlining the steps required to make a pull request… only to realize some people on my team didn’t know what a pull request was. Whoops. So let’s clear that up!

The Problem with Collaborative Repositories

If you’re reading this article, I’m going to assume you’ve used Github before. You’ve made a personal repository for your own code, created commits, and then pushed those commits to that repository. This is a fantastic milestone in your development journey! Now you want to contribute to someone else’s repository. Perhaps this repository is open source, or perhaps it is a team’s repository. Okay, but simple enough, right? Let’s just clone this repo and push commits to it, just like you did with your personal repo.

BUT WAIT! That’s dangerous territory. What if someone pushes error-filled code to this shared repository? Or even worse, what if some malicious Github user intentionally breaks the app with pernicious code? We can’t have that! Therefore, this collaborative repo needs one or more trusted maintainers that review all incoming changes. Now the question is: how do you run your code by these maintainers?

Answer: You Make a Fork

A fork is simply a copy of the repo that lives on your own personal Github profile. You can make any changes you want to this fork and experiment all you want with its code, and that’s fine! Any changes you make to your fork have no effect on the original (henceforth, “upstream”) repository you forked from. In fact, the only way your changes make it into the upstream repo is through pull requests.

github git github repos

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

What is Git & Github || Why to use Git & Github

In today's video, we are doing to learn about what is GIT & Github and why should we use them. Git is a distributed version control system for tracking changes in source code during software development.

Git vs. GitHub | What is Git and GitHub?

Naz talks about the differences and similarities between Git and Github. A very common question amongst the programming community. Let's settle this once and for all.

Git And GitHub Full Course | Git And GitHub Tutorial For Beginners

Git and GitHub full course will help you understand the basics of Git, followed by installing Git on Windows. You will learn about GitHub and look at the difference between Git and GitHub. You will look at some of the essential Git commands. Then, you will understand Git merge conflict and how to resolve it. Finally, we'll see some critical git interview questions.

Git and GitHub Tutorial || Git Architecture || Git Crash Course || Professional Git

Git and GitHub Tutorial || Git Architecture || Git Crash Course || Professional Git (Things no one taught). This is a git tutorial for beginners/ github tutorial using git bash only. Hence it will enhance the knowledge of git commands as we will do all the operation used in git using git bash and git command manually. There are many GUIs available but using commands will be the best way to learn git.

Best Practices for Using Git

Git has become ubiquitous as the preferred version control system (VCS) used by developers. Using Git adds immense value especially for engineering teams where several developers work together since it becomes critical to have a system of integrating everyone's code reliably.