How do I push to GitHub under a different username?

后端 未结 20 1991
盖世英雄少女心
盖世英雄少女心 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:47

    The userid where the commit happens is stored in the config file.

    go to the top of the repository vi .git/config

    change the url line listed after "[remote "origin"] to have the appropriate userid

提交回复
热议问题