1

git rebase origin/develop fails with information

There is no tracking information for the current branch.
Please specify which branch you want to rebase against.

This doesn't make sense to me as I explicitly specify the branch. I'm pretty sure I have used this command before many times like this and it worked. This is true that this branch doesn't have tracking information but it doesn't have to and I don't want it to.

Here is listing of my git branch -a:

  develop
  master
* resolve
  test
  remotes/origin/HEAD -> origin/master
  remotes/origin/develop
  remotes/origin/master

Any ideas?

Git version: 2.9.0.windows.1
OS: Windows 7

Vistritium
  • 380
  • 2
  • 12
  • What about `git rebase origin/develop resolve`? – 1615903 Jun 28 '16 at 06:22
  • @1615903 I receive the same error message as before – Vistritium Jun 28 '16 at 06:25
  • 2
    Is it the same bug as http://stackoverflow.com/a/37875545/6309? (ie: what git version are you using, and on which OS?) – VonC Jun 28 '16 at 06:40
  • It seems like this is the same or very similar problem. I have updated my question with git version and OS. – Vistritium Jun 28 '16 at 06:50
  • Does the same solution apply? "if I quit MacType, git rebase just works fine. Anyway I think if I put bash.exe to the exclusion list, should also good" – VonC Jun 28 '16 at 07:02
  • I'm not sure what is MacType and what exclusion list they are talking about. – Vistritium Jun 28 '16 at 07:35
  • @Vistritium http://www.makeuseof.com/tag/make-windows-fonts-look-like-mac-fonts/ (exclude: https://github.com/mono0x/dotfiles/blob/master/mactype.ini#L41) – VonC Jun 28 '16 at 10:23
  • @Vistritium Exclude MActype: http://superuser.com/a/646893/141 – VonC Jun 28 '16 at 10:29

2 Answers2

0

Please try a

git pull remotebranch

git branch --set-upstream-to=remotebranch

Sometimes when we drop and re-create a remote, the tracking information stored by the original fetch might get lost. Hope this helps.

Gauthaman Sahadevan
  • 923
  • 1
  • 11
  • 19
  • Why do I need to setup tracking information? I explicitly tell git what branch I want to rebase against. This branch is not supposed to have any tracking information - it's for local purposes only. – Vistritium Jun 28 '16 at 06:04
  • Sorry. Works well in my system. With GIT version 2.5.3.windows.1 and Windows 7. Must be a bug? Discussion in the comments? – Gauthaman Sahadevan Jun 28 '16 at 10:11
0

As per https://stackoverflow.com/a/5964697/2949612 answer you need to set origin/develop branch as upstream branch for reslove branch.

Step 1:

git branch --set-upstream resolve origin/develop

Step 2:

git rebase origin/develop

I hope its helps you.

Community
  • 1
  • 1
pRaNaY
  • 24,642
  • 24
  • 96
  • 146
  • But I explicitly tell git what branch and what remote I want to use, setting upstream branch should not be needed in this case (as said in the answer you linked too). I would need to setup up-stream if I would want to execute "git rebase develop" but this is not my case. – Vistritium Jun 28 '16 at 09:38