Working in Team at Development using Git

What is Git?

https://git-scm.com/images/logos/2color-lightbg@2x.png

Some benefits of using Git

  1. Feature Branch Workflow

Risks of not using Git

I have never tried to work on a team project without using Git, but here are a few risks that I could imagine if you decided not to use Git for your group project.

Few basic commands of git

Here are a few examples of basic commands of GIT that you could use on the command line.

Implementation example of git commands

  • git clone and git branch
cloning a remote repository to local and checking the branch
pulling staging branch from PBI-14-melihat_profil_shelter branch
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

You could use both Git Merge and Git Rebase command to integrates your branch with another branch, but there are a few differences between the two.

  1. 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.
https://www.atlassian.com/git/tutorials/merging-vs-rebasing
https://www.atlassian.com/git/tutorials/merging-vs-rebasing

Example of workflow with Git

https://scele.cs.ui.ac.id/pluginfile.php/99036/mod_resource/content/1/Panduan%20Git%20PPL%202021.pdf
  1. 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.
  2. 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.
  3. 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.
  4. 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

--

--

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