J
J
Jekson2019-03-20 10:32:05
git
Jekson, 2019-03-20 10:32:05

How to push to a non-master branch?

Tell me how to properly push to the branch. In the main repository on github, I created a softt branch. I added files on my local, made a commit, connected the repository

git remote add origin https://github.com/data-io/maxmind.git

Then I try
git push -u origin softt
I get
error: src refspec softt does not match any.
error: failed to push some refs to 'https://github.com/data-io/maxmind.git'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2019-03-20
@Lepilov

Why -u?
Just do git push origin HEAD
You don't need to create a separate branch in the remote repository, it's some kind of game.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question