使用Git上传代码到远程仓库

使用Git上传代码到远程仓库

1.配置Git

1.下载安装Git

2.配置用户以及邮箱方便以后查看谁上传的代码

powersi@hongyi MINGW64 ~/Desktop
$ git config --global user.name "nie hongyi"

powersi@hongyi MINGW64 ~/Desktop
$ git config --global user.email "1827661825@qq.com"

3.在idea中配置Git所在位置。File-->Settings-->Version Control-->Git

2.创建本地仓库并上传

4.创建远程代码仓库

5.创建本地仓库。VCS-->Import into Version Control-->Create Git Repository...

6.添加缓存区。右击-->Git-->add

7.将缓存区的项目添加到本地仓库。右击-->Git-->Commit Diectory...

8.上传代码到远程仓库中。右击-->Git-->Repository-->Push

3.参考文献

[1] idea 使用idea上传项目到码云(gitee)上 IntelliJ IDEA https://blog.csdn.net/qq_22194659/article/details/82113560

posted @ 2021-07-02 16:32  聂鸿翼  阅读(203)  评论(0)    收藏  举报