0

From git window, I executed these commands:

git branch 
master
*wcopy

git commit -am "modified provider features"
On branch wcopy
Your branch is up to date with 'origin/wcopy'.

nothing to commit, working tree clean

git merge wcopy
Already upto date

git push origin master
Everything up-to-date

I go to git hub repository Branch master says: latest commit 9 days ago

Branch wcopy says: This branch is 2 commits ahead, 5 commits behind master. Latest commit db8bdca 18 minutes ago

I checked brnach wcopy the code is upto date But master is behind.

I merged into master via git command, but it still shows two separate branches with master behind wcopy

(1) How can I bring master upto date? (2) Also I renamed a file DB/Model.xcdatamodeld to Model.xcdatamodeld on my source. But the wcopy branch shows the path as DB/Model.xcdatamodeld/GridModel.xcdatamodel says this path skips through empty directories. If I look at the actual code on the source, it shows the path correctly as DB/Model.xcdatamodeld I don't know why the difference?

Martin R
  • 529,903
  • 94
  • 1,240
  • 1,382
vrao
  • 545
  • 2
  • 12
  • 33

2 Answers2

1

I merged into master via git command, but it still shows two separate branches with master behind wcopy

When you did this:

git merge wcopy

You merged wcopy into itself, the wcopy branch, which of course didn't do anything. You should have switched first to the master branch, then did the merge:

git checkout master
git merge wcopy
# resolve possible merge conflicts...
git push origin master
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
  • Now I try to open the xcode project it says cannot be opened because project file cannot be parsed. I am in deep trouble now for reasons stated above. I go to github it says This branch is 6 commits behind master – vrao Aug 17 '18 at 00:09
  • @vrao This sounds like a possibly totally different problem. In which case, you might want to open a new question. – Tim Biegeleisen Aug 17 '18 at 01:39
1

Instead of doing this:

git merge wcopy

By doing that you merged wcopy into itself (which is not what you require). You should have switched to the master branch, then did the merged wcopy branch into master by doing this:

git pull origin wcopy
# to make sure you are up to date on wcopy branch
git checkout master
# to have your master branch up to date with the remote.
git pull origin master
git merge wcopy
# resolve possible merge conflicts if any.
git push origin master

This should resolve all your problems and merge branch wcopy with master.

Mukesh A
  • 323
  • 1
  • 4
  • 13
  • git merge wocpy gives a bunch of errors: (1) warning: Cannot merge binary files and (2) auto-merging on some other files gives conflict(content): merge conflict. They says Automatic merge failed; fix conflicts and then commit the result. – vrao Aug 16 '18 at 23:32
  • from command tool I run git mergetool: brings up a UI with multiple windows on the xcodeproj/project.pbxproj file. I dont understand what is going on – vrao Aug 16 '18 at 23:52
  • Now I try to open the xcode project it says cannot be opened because project file cannot be parsed. I am in deep trouble now – vrao Aug 17 '18 at 00:06
  • Please read up on this https://stackoverflow.com/questions/278081/resolving-a-git-conflict-with-binary-files about how to resolve conflicts with binary files and look at this for how to use mergetool https://gist.github.com/karenyyng/f19ff75c60f18b4b8149 – Mukesh A Aug 17 '18 at 01:19