Working in Team at Development using Git

What is Git?

Some benefits of using Git

  1. Feature Branch Workflow

Risks of not using Git

  1. Hard to integrate your works with others

Few basic commands of git

  1. Git pull

Implementation example of git commands

  • git clone and git branch
cloning a remote repository to local and checking the branch
  • git checkout and git pull
pulling staging branch from PBI-14-melihat_profil_shelter branch
  • git add, git commit, and git push
saving all of the changes in the project before pushing it to PBI-14-melihat_profil_shelter branch

Difference between Git Merge and Git Rebase

  1. Git merge keeps all of the commit histories of the source branch, while Git rebase makes all of the commits from the source branch into a single commit, and integrates it to the target branch.
  2. Git merge only integrates the source branch with the target branch while keeping the source branch intact without any change. Meanwhile, in Git rebase, not only the target branch got changed, but the source branch got moved to the last commit of the target branch. This result in the different project history, in which Git merge got some branching in the history with its own commit and target branch commit, while Git rebase got cleaner history without any branching. Here’s the illustration below.

Example of workflow with Git
  1. Master branch: The main branch of the project. stores the source code of the project that’s ready for deployment.
  2. Staging branch: The main branch that was used for development. Store all of the source code from all the branches that stored individual work of each member. All of the integrated code will be tested and reviewed before it’s ready to be pushed to the master branch.
  3. PBI branch: Used for the implementation of specific features of the project. The features will be developed with TDD and will be pushed to the staging branch when it’s finished.
  4. Hotfix: Used for fixing bugs and errors on the master branch. When the issues are fixed, this branch will be merged back to the master branch.
  5. Coldfix: Used to erase all the changes on the staging branch from all the PBI branches. Happened when the client rejected the features in one or all of the features implemented from the PBI branch.
creating a new PBI branch from the staging branch
pulling the staging branch to the PBI branch




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Global And Local Variables In Python

Docker Containers — Basic to Advance

5 Ways To Write Loops in Bash

A ninja man standing on the top of a house

I shot my vlog yesterday.

MPLAB Xpress: XC8 code for SHT1x click board

How to add Collectible objects in our games!

5 Fantastic Developer Tools for Async Comms 🎯

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
Abdurrahman Luqmanul Hakim

Abdurrahman Luqmanul Hakim

More from Medium

2021 ‘As Above, so Below’ — Architecture Design Competition Launched by UNI to An Urban…

About Backend web framework

Part-01: Hibernate Basics

#CandidsAtJar ft. Rohan