1

I am using hubflow tools. I am simply cloning an empty repository. Adding a test file and the commit changes and then push new changes to repository via git hf push But everytime i am getting same error message : fatal: ambiguous argument 'origin/feature/appjhagsd': unknown revision or path not in the working tree. I used these simple commands :

cd testrepo/
git hf init
git hf feature start appjhagsd
Switched to a new branch 'feature/appjhagsd'

git status
On branch feature/appjhagsd
nothing to commit, working directory clean

touch abc
git status 
On branch feature/appjhagsd
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    abc


git add .
git commit -m "test"
[feature/appjhagsd 4bf5907] test
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 abc

git hf push
Fetching origin
fatal: ambiguous argument 'origin/feature/appjhagsd': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Not a valid object name origin/feature/appjhagsd
merge: origin/feature/appjhagsd - not something we can merge

There were merge conflicts. To resolve the merge conflict manually, use:

    git mergetool
    git commit

You should then push your changes back up to 'origin', using:

    git push 'origin' 'feature/appjhagsd'

After you have pushed back to 'origin', please retry your HubFlow command

To solve this issue temporary i am using thise command : git push -u origin origin/feature/appjhagsd but this should not happen, please help me if you have any ideas.

Farhan
  • 751
  • 1
  • 9
  • 17

1 Answers1

0

I don't think there is proper solution but it will work somehow. I just copy pasted this command from the last line given above in the question : git push 'origin' 'feature/appjhagsd'

Then it will be pushed to the above branch but still git hf push should also work right?, i believe it was working perfectly before, now i think there is some problem. After copy pasting the above command then git hf push will work .

But if i create another feature branch then same thing will happen and you have to do the same thing explained above to solve this.

Farhan
  • 751
  • 1
  • 9
  • 17