How to get changes from master branch to a new branch in Git

0 votes

Hi Team,

I have a branch in Git which I'm working on. After that, I have committed new work and some bugs came in master. What is the best way to get those commits into that branch?

Jan 4 in Git & GitHub by akhtar
• 38,210 points
210 views

1 answer to this question.

0 votes

Hi@akhtar,

You need to check out the branch and rebase it from the master branch as shown below.

$ git checkout aq
$ git rebase master
answered Jan 4 by MD
• 95,300 points

Related Questions In Git & GitHub

0 votes
1 answer

How to do a re-merge into another branch in git

Seems like you want to rebase your ...READ MORE

answered May 7, 2018 in Git & GitHub by DareDev
• 6,890 points
1,077 views
0 votes
1 answer

How to get the current branch name in Git?

Hi@akhtar, You can run the git branch command ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,300 points
2,162 views
0 votes
1 answer

How to perform a sonarqube analysis from drone.io in github?

DRONE_PULL_REQUEST  env variable holds the pull request ...READ MORE

answered Jul 6, 2018 in Git & GitHub by DareDev
• 6,890 points
1,391 views
0 votes
1 answer

How to give a file execute mode permissions in Git?

You can easily do this in one ...READ MORE

answered Aug 7, 2018 in Git & GitHub by Sophie may
• 10,550 points
10,796 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,292 views
+2 votes
1 answer
0 votes
1 answer

How to create branch in GitHub from my local Git repo?

Hi@akhtar, To sync your existing branch in GitHub, ...READ MORE

answered May 7, 2020 in Git & GitHub by MD
• 95,300 points
174 views
0 votes
1 answer

How to move the most recent commits to a new branch with Git?

Hi@akhtar, If you want to move your commits ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,300 points
136 views