Team Collaboration with GitHub

Understanding the basic GitHub workflow for a team

Image for post
Image for post
From goodworklabs.com, How GitHub is Shaping Your Software Career
Image for post
Image for post

1. Make feature branch from master branch

# First, make sure you are in the master branch in the local repository.
git checkout master
# Pull changes from the remote repository.
git pull
# Create a new branch and checkout
git checkout -b feature-1
# Integrate changes from the master branch to the current branch
git rebase master

2. Add commits from feature branch

# Add changes in the staging area
git add file-name
or
git add .
# Record staged changes with a log in the local repository
git commit -m "Descriptive Message"

3. Push commits and create Pull Request

# Push changes to the remote repositorygit push origin feature-1
or
git push
Image for post
Image for post
Image for post
Image for post

4. Get reviews from your team

Image for post
Image for post
Image for post
Image for post

5. Merge to master branch

Image for post
Image for post

References:

Written by

Full Stack Software Engineering Student at Flatiron School

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store