Git push command, error encountered -fatal: invalid refspec 'https://github.......git'

16,265

You should "git remote add" origin, not master:

git remote add origin https://...
git remote remove master
git push -u origin master
Share:
16,265

Related videos on Youtube

melony_r
Author by

melony_r

Updated on June 24, 2022

Comments

  • melony_r
    melony_r almost 2 years

    I'm in the master branch and have added the remote branch, after which I'm unable to push the data from local to remote.:

    $ Git remote add master https://....git
    
    $ Git push origin master https:// ...git
    Fatal: invalid refspec 'https://...git'
    

Related