-1

I am trying to commit some new lines of code from my repository to Aws. I have everything synced on Github. Trying to do a pull from my repository to the EC2 instance.

I ssh in to my EC2, no issues here, but when I do "git pull" (and enter in my github username and password) i get a prompt saying:

"You are not currently on a branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch>".

Update: I tried a 'git checkout master' before the 'git pull' but it messed up by EC2, the site is down with these errors - 'Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then use 'git add/rm <file>' as appropriate to mark resolution, or use 'git commit -a '

Appreciate your help!

srb
  • 45
  • 2
  • 11

1 Answers1

0

Try git checkout -b <your_branch>, it seems that your local Git isn't working in any branch right now.

  • With "-b" you are creating a new branch with the given name, while the solution might be simply checking out to an existing one... – Яois Apr 25 '15 at 20:22