如何在 Mac 上的 IDEA 上传代码到 GitHub

1、➣:IDEA 使用 github

1、Settings

Setting--搜索 GitHub ----> 输入账号和密码 ----> Test ----> 连接成功
如何在 Mac 上的 IDEA 上传代码到 GitHub

2、GitHub 界面

网址:https://github.com/stephencurry1/hjh1
如何在 Mac 上的 IDEA 上传代码到 GitHub

3、上传代码到 GitHub

按下图操作
如何在 Mac 上的 IDEA 上传代码到 GitHub

4、遇到报错

如何在 Mac 上的 IDEA 上传代码到 GitHub
说明没有下载 git 客户端。

5、下载 git

下载地址:https://git-scm.com/downloads
如何在 Mac 上的 IDEA 上传代码到 GitHub
㊟ :*下载会更快。
如何在 Mac 上的 IDEA 上传代码到 GitHub
6、查看 git 在 mac 中的位置

在命令行中输入 which git

如何在 Mac 上的 IDEA 上传代码到 GitHub

7、在 IDEA 中配置 git

从终端中的 which git 的地址,输入到 idea 中,如下图:
如何在 Mac 上的 IDEA 上传代码到 GitHub
然后点击 test
如何在 Mac 上的 IDEA 上传代码到 GitHub

8、上传代码到 GitHub

如何在 Mac 上的 IDEA 上传代码到 GitHub

如何在 Mac 上的 IDEA 上传代码到 GitHub

➣:到 GitHub 查看是否上传上去了

如何在 Mac 上的 IDEA 上传代码到 GitHub

➣:点击 Code 就可以刷新,查看是否将代码上传到了 GitHub
如何在 Mac 上的 IDEA 上传代码到 GitHub

9、下载代码到本地

如何在 Mac 上的 IDEA 上传代码到 GitHub