git pkworlz
git pkworlz
in ,

Best (and safest) way to merge a git branch into master

A new branch from master is created, we call it test.

There are several developers who either commit to master or create other branches and later merge into master.

Let’s say work on test is taking several days and you want to continuously keep test updated with commits inside master.

I would do git pull origin master from test.

Question 1: Is this the right approach? Other developers could have easily worked on same files as I have worked btw.

Question 2: What is the right method to do it?

—————————SOLUTION————————————

git checkout master
git pull origin master
git merge test
git push origin master

Author Profile

PREM KUMAR
PREM KUMAR
Hey Its..! Tech Lover , Ionic, Angular, Typescript, Dotnet Core, Node, Like Opencv, AI, ML, Robotics, Iot, Love Music, Cooking, Girls, Innovation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What do you think?

400 Points
Upvote Downvote
Pragma14

Autonomous transactions benefits

wkwebview

Breaking changes coming to the iOS WebView in Apache Cordova