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,240 points
2,455 views

1 answer to this question.

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,890 points

Related Questions In Git & GitHub

0 votes
1 answer

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

Hi@akhtar, You need to check out the branch and ...READ MORE

answered Jan 4, 2021 in Git & GitHub by MD
• 95,460 points
1,130 views
0 votes
1 answer

How do I go to a particular version of a file in the Git repository?

Hi@akhtar, You can use git checkout <sha1> to check ...READ MORE

answered Jan 5, 2021 in Git & GitHub by MD
• 95,460 points
2,907 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,620 points
21,048 views
0 votes
1 answer

How to add a remote git repository in Jenkins

Follow these steps: Step 1 Go to Manage ...READ MORE

answered May 23, 2019 in Git & GitHub by Alok
13,650 views
0 votes
1 answer

How to untrack a file in Git?

Hi@akhtar, You can untrack your file from git ...READ MORE

answered May 4, 2020 in Git & GitHub by MD
• 95,460 points
13,466 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
4,034 views
+2 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,890 points
2,602 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP