简体   繁体   中英

How can I get use rebase instead of merge?

I have two branches dev and master with 1 conflict when I get the difference I get:

-    if (1 == 1) {
-console.log('hi from master')
+    if (1 != 1) {
+console.log('hi from dev')
     }

When I go: git merge master, I get : Already-up-to-date? If I want to merge these 2, can I use rebase instead of merge? When I do git rebase master I get:

First, rewinding head to replay your work on top of it...
Applying: first commit
Using index info to reconstruct a base tree...
M   app.js
Falling back to patching base and 3-way merge...
Auto-merging app.js

After this I still have the same difference?

See more code: github: more code

Are you sure your local master branch is up-to-date with the remote?

You can try running from dev :

git fetch
git merge origin/master

Or alternatively

git checkout master
git pull
git checkout dev
git merge master

to ensure that your local master branch is up-to-date with the remote.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM