0

I am tryinng to merge update from a master code on another person's github page, and I have almost everything fixed. Now when I type git checkout master I get this in response:

$ git checkout master
> FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NullOp.java: needs merge
> doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.MotorCallback.html: needs merge
> error: you need to resolve your current index first

When I run git diff I get this:

> Unmerged path FtcRobotController/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes/NullOp.java
> Unmerged path doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.MotorCallback.html

Now these two files do not appear when I look through my file manager.

Git newbie, please be kind to me.

Scott Newson
  • 2,745
  • 2
  • 24
  • 26
BarrowWight
  • 181
  • 2
  • 12
  • The first question here is *what are you merging, and why?* Your question says "... update from a master code on another person's github page" but you cannot merge from a web page, you can only merge from a *commit* (often, the tip of some named remote-tracking branch, such as `origin/master` or `upstream/develop`). If your Git is not too ancient, `git status` output may be helpful as well. – torek Oct 14 '16 at 01:54
  • @torek my bad. I have created a pull request and checkedout a new branch where I resolved the merges. – BarrowWight Oct 14 '16 at 01:57
  • OK, so, you ... used the GitHub "fork a repo" interface? I don't normally work with any of this myself, but just as a general rule, it will help those who do, to list specifically what tools (GitHub's "desktop" thing?) you used and what commands you've run / things you've clicked in some GUI / ... – torek Oct 14 '16 at 02:13

1 Answers1

-1

This looks like a duplicate of Git merge errors and How to resolve a git merge conflict?

(first couple of results from a google search for 'error: you need to resolve your current index first git')

Basically, you are in the middle of a merge and need to finish or reset the merge before doing anything else.

Community
  • 1
  • 1
Scott Newson
  • 2,745
  • 2
  • 24
  • 26
  • 1
    The second one of those does not solve my problem, and the first one recommends resetting the entire thing, I do not want to reset, especially as those files were not there either. – BarrowWight Oct 14 '16 at 01:41
  • 1
    In addition, it recommends simply merging them, but the issue is that I cannot merge this part, because the files are missing. – BarrowWight Oct 14 '16 at 01:47