Answer the question
In order to leave comments, you need to log in
Remote origin already exists error, how to fix?
How to add a remote origin branch, and if it already exists, then do not add it, with one command?
+ what's the difference between:
Answer the question
In order to leave comments, you need to log in
In my case, this error appeared due to the fact that this branch already existed and the url was the same.
Therefore, this "mixture" of two commands helped me:
That is, if the branch exists - just update the url, if not - then add it.
More information can be found here and here
What is the magic of >/dev/null 2>&1 read here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question