I want to push the commited branch to another automaticly by using config.yml. The problem is that recieve error like:
fatal: ‘origin/dev’ does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Exited with code 128
When I am using
git remote -v , I can see:
origin firstname.lastname@example.org:myname/repo.git (fetch) origin email@example.com:myname/repo.git (push)
And on the github required branch “dev” exists. Below you can see the part of my *yml code for CircleCi.
- run: name: Git config email command: git config --global user.email "firstname.lastname@example.org" - run: name: Git config name command: git config --global user.name "Name" - run: name: git remote -v command: git remote -v - run: name: Push to dev command: git push origin/dev
git checkout dev git merge origin/commited_branch
worked good, but i dont want to hardcode the name of the branch, just want to push every new commit in every branch (excluding branches “dev” and “master”) to the branch “dev”. Is it possible?
I also thought that the problem is about the key, and tried like this:
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa -F /dev/null" git push origin/dev
But the result is the same.
And if I use command:
git push origin dev
I have an error:
error: src refspec dev does not match any.
error: failed to push some refs to ‘email@example.com:myName/myRepo.git’
Exited with code 1
git show-ref shows me next:
refs/heads/commited_branch refs/heads/master refs/remotes/origin/HEAD refs/remotes/origin/commited_branch refs/remotes/origin/dev refs/remotes/origin/master