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

0 votes

I am working on a demo branch in git but whenever I try to merge it with the master its says it's already up to date. Then if I do a git diff it shows that a lot of files are different.

I want to re-merge master into demo, while keeping the changes which I've made in the demo branch, merging the files that I've changed in master.

May 7, 2018 in Git & GitHub by Atul
• 10,190 points
57 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Seems like you want to rebase your demo branch from the master branch.

use this command to rebase:

git rebase origin/master 

This is what rebasing does.

Rebasing will keep the changes made in your demo branch while adding all the changes you've made to the master ever since you branched out from it.

answered May 7, 2018 by DareDev
• 6,520 points

Related Questions In Git & GitHub

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 6, 2018 in Git & GitHub by Sophie may
• 9,050 points
65 views
0 votes
1 answer
0 votes
1 answer

How to view the nested workflow of a local git repository?

The ‘git log’ command is your closest ...READ MORE

answered Jul 4, 2018 in Git & GitHub by Sophie may
• 9,050 points
38 views
0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,280 points
28 views
0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 9,050 points
20 views
+13 votes
2 answers
0 votes
1 answer
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,520 points
254 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.