Working with parallel branches in Git

Introduction

Hello everyone, my name is Dustin, today I want to write a blog about my progress of working with branches in Git. So this is the lab 03, which I have to create 2 parallel branches to work on different aspects of the program.


This content originally appeared on DEV Community and was authored by Tuan Thanh Tan

Introduction

Hello everyone, my name is Dustin, today I want to write a blog about my progress of working with branches in Git. So this is the lab 03, which I have to create 2 parallel branches to work on different aspects of the program.

The progress

First off, I needed to decide what to add to my program. At the time, I had a few options like changing code block, or hr, or exit code for my program... So I thought that the exit code is a must that my program needed to have and the code block thing is quite more interesting than hr. After choosing what I needed to do, I had to file 2 issues so I had something to refer back to.

The 2 issues I was talking about:
First one
Second one

Writing code for these 2 issues are quite straightforward. It took me a few minutes to finish it. However, I'm not so sure about the inline code block thing, and should ask my professor about it to make sure that's what he's looking for.

So, for the first issue, I created a new branch called issue-18 and issue-19 for the second issue. When finishing the first issue, I had to git add and git commit and switched to branch issue-19 to continue coding. As I've done it, I also had to git add and git commit. After that, I had to use merge to merge those 2 branches.

Merging branches

I used git merge issue-18 which is my first issue, git had no problem merging it. It was fast forward right away. However, for the second issue, when I git merge issue-19, instead of fast forward, Git used three way recursive strategy. Then, I just needed to push it to github so the code will be visible to everyone.

Project Repo
Commit 1
Commit 2


This content originally appeared on DEV Community and was authored by Tuan Thanh Tan


Print Share Comment Cite Upload Translate Updates
APA

Tuan Thanh Tan | Sciencx (2021-09-30T19:02:51+00:00) Working with parallel branches in Git. Retrieved from https://www.scien.cx/2021/09/30/working-with-parallel-branches-in-git/

MLA
" » Working with parallel branches in Git." Tuan Thanh Tan | Sciencx - Thursday September 30, 2021, https://www.scien.cx/2021/09/30/working-with-parallel-branches-in-git/
HARVARD
Tuan Thanh Tan | Sciencx Thursday September 30, 2021 » Working with parallel branches in Git., viewed ,<https://www.scien.cx/2021/09/30/working-with-parallel-branches-in-git/>
VANCOUVER
Tuan Thanh Tan | Sciencx - » Working with parallel branches in Git. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/09/30/working-with-parallel-branches-in-git/
CHICAGO
" » Working with parallel branches in Git." Tuan Thanh Tan | Sciencx - Accessed . https://www.scien.cx/2021/09/30/working-with-parallel-branches-in-git/
IEEE
" » Working with parallel branches in Git." Tuan Thanh Tan | Sciencx [Online]. Available: https://www.scien.cx/2021/09/30/working-with-parallel-branches-in-git/. [Accessed: ]
rf:citation
» Working with parallel branches in Git | Tuan Thanh Tan | Sciencx | https://www.scien.cx/2021/09/30/working-with-parallel-branches-in-git/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.