0

I have two branches, master and a local branch. I want to merge changes made from master to my local branch. I know the changes in master are more recent than the ones in my local branch, but when I go to the local branch and write git merge master, the response is Already up-to-date. I may have tricked my local branch into believing it is more current than master, I'm not sure how.

How can I force a merge conflict? Most of the files in master are more recent than the ones in local?

Minh Tri Pham
  • 861
  • 3
  • 9
  • 18

3 Answers3

1

Fetch the remote changes before merge:

git checkout local_branch
git fetch origin
git merge origin/master 

I assume that you've used origin as the name for the remote.

hek2mgl
  • 152,036
  • 28
  • 249
  • 266
0

I m considering that you have the latest code in your master and it is in your workstation

 git checkout local;
 git merge -s ours master;
Girish
  • 1,717
  • 1
  • 18
  • 30
0

Maybe you want rebase instead of merge?

Checkout local branch. Then:

git rebase master

Rebase is usually what you want when you're thinking about merge.

Git workflow and rebase vs merge questions

Community
  • 1
  • 1
joel3000
  • 1,249
  • 11
  • 22