How To Collaborate On GitHub?

507 Views
0 rating based on 0 reviews

When you first sign up for GitHub, it is easy to see the benefits of having your projects under version control. But maintaining a private repository can also be useful. Perhaps you are part of a group project or need to work on documentation as part of your work. In this article we will look at how to collaborate on GitHub by creating an organization and inviting additional members.

Collaborate on GitHub

GitHub is the place for people to share source code for all types of applications ranging from a single file to hundreds of files. GitHub allows people to work together on the same team or project and share their work, ideas, and inputs. GitHub is a platform where people working on the same project can know each other’s work and also instruct for improvement.

Collaborating in GitHub is an easy way to do that. Suppose, you are working on a team to improve a webpage or game. You may have an idea you want to add to your project. As it is a team project, other people in the team may also want to express their ideas and codes to implement.

To combine all of the team’s ideas, submit all the ideas to their branch of the project. After that, it will be reviewed by the team leader and merged with the main content.

Before you get started

You must have logged in to your GitHub account. Also, you and your team must have access to the repository to make any changes in their corresponding branches. Instruct your team to continue working on their separate features in their various branches. Tell them to submit their completed features and it's the job of the leader to merge them into Master to be deployed.

Determining your Git Flow is a huge part of working in a team, but here’s one Git Flow you could follow in your team:

  1. Determine who’s going to be in charge of handling the merging of the project. If more people acting independently on merging it is harmful to a team. So, have on ring leader among your team who will review the branches and merge them without any conflicts between the team.
  2. Tell everyone to submit their branches in the repository.
  3. Go to the GitHub Repository page. You should see the branch you pushed up in a yellow bar at the top of the webpage with a button to “Compare & pull request”.
  4. You can also select the branch in the drop-down “Branch:” menu and select the branch you just pushed up. You’ll then have “Pull request” and “Compare” buttons on the right section of the webpage.
    Pull request and compare
  5. Click “Compare & pull request”.
    Combined comparing and pull request
  6. This will take you to the “Open a pull request” page.
    Add new elements
  7. Write a brief description of what you added or edited. And you should click the “Reviewers” tab and select whomever your team decided would be the “Merge Master”. You can also mention any of the team members to show them your changes.
    Mentioning the leader or a person
  8. When you’re done, click “Create pull request” on the bottom right.
  9. The changes you made from the original file will be in a branch. Wait for the merging head to review your changes. If the changes seem useful to him, he will add them to the main branch for the team and viewers to see.

Summary: Collaborate on GitHub

  • Create a new branch.
  • Make local changes and commit them.
  • Push your changes to GitHub.
  • Open a pull request.
  • Discuss, review and tweak your proposed changes.
  • Merge your pull request.