Based on : How do I push a new local branch to a remote Git repository and track it too?
I have a local branch named as 'new_branch' and I would like to push the local branch to remote as the following:
$ git ls-remote origin
433ecee11614bcda452ddf5817ebb56212d96192 HEAD
94d6b198dd6bbba9520e8aa11a1d6fc67aed818a refs/heads/feature/f1
76d6b198dd6bbba9520e8aa11a1dafc67aed818a refs/heads/feature/f2
$git push -u origin feature/new_branch
The git reports the following errors:
fatal: 'origin/feature/new_branch' does not appear to be a git repository fatal: Could not read from remote repository.
I try the following and it works for me but this is not what I want.
$git push -u origin new_branch
My local environment has not installed 'git flow'. Is it possible that I can directly push a non-feature local branch to a feature branch in remote?
Thank you