How do I push to GitHub under a different username?

后端 未结 20 2035
盖世英雄少女心
盖世英雄少女心 2020-12-02 04:00

A friend and myself are sharing my computer. I\'ve made pushes to GitHub using the git bash shell on Windows 7. Now we\'re in a different project on that computer and I need

20条回答
  •  孤城傲影
    2020-12-02 04:31

    You can add a new remote URL for the other username using git remote add origin-username https://username@github.expedia.biz/repository_name.git

    After this, if you'll push using git push -u origin-username master , this will prompt you for the password.

提交回复
热议问题