I have created a git branch from master at a certain commit that is a bit behind. I made some updates and tried to push to that specific branch.
Steps I did:
After push I get the following error:
remote:
remote: Create pull request for [new-branch]:
remote: http://stash......[url]
remote:
When I try to checkout to my new branch of the staging server I get:
fatal: ambiguous argument 'origin/[new-branch]': unknown revision or path not in the working tree.
I don't know how to proceed further.
Hi, Vlad
Check what is the output of following command.
git status
Next I would check if the remote is set up correctly:
git remote -v
Then see how the branch you are looking for is displayed (if it is, that is):
git branch -a
If you see no remote branches pointing to origin/master then execute following command:
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master
This should set refs/remotes/origin/HEAD to point to the origin/master branch.
Hope this helps!
What do you mean by "staging server"? Is it a different server from the one you pushed to in the previous step?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes it is a different server. I think my branch is only local or something.
I also tried to create a new branch from a JIRA task, as a hotfix, and there it detected by [new-branch]. And i created a new branch hotfix/[newer-branch] from the [new-branch], directly from the platform.
This doesn't work either, still doesn't see my branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.