S
S
Sergey Pugovkin2021-01-23 15:39:19
git
Sergey Pugovkin, 2021-01-23 15:39:19

Push changes to another branch?

There are two branches:
master and develop.
Cloned the repository, made changes (it turns out in master):
git branch -agives:

* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/develop
  remotes/origin/docs
  remotes/origin/master

How now to push these changes, but not in master, but in develop?
git push origin developgives an error:
error: src refspec develop does not match any
error: failed to push some refs to 'https://gitlab.com/***/***.git'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
olkhovichs, 2021-01-23
@Driver86

Trygit push origin master:develop

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question