# Alchemy 第四周上传github简单方法

By [lingge-twitter@shangdu2005](https://paragraph.com/@lingge) · 2022-08-17

---

首先谢谢美女的教程，真的是用心了!人美做事耐心又认真，实在佩服！

没做的朋友按教程来就行！

[https://mirror.xyz/0xCD0e394639B2D0b159B41F9dBe0583C33d85e874/XlXqh697bnRkkmzb9jdC4rHOMpPI0KPe6FCBZANZdHU](https://mirror.xyz/0xCD0e394639B2D0b159B41F9dBe0583C33d85e874/XlXqh697bnRkkmzb9jdC4rHOMpPI0KPe6FCBZANZdHU)

第四周上传代码对于小白朋友有点麻烦，其实很简单，把自己现学的方法，分享给大家！

首先下载git软件，根据自己的电脑情况下载就行！下载好直接安装，全部默认！

[

Git
---

Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

https://git-scm.com

![](https://storage.googleapis.com/papyrus_images/40370377ea2c1597038d170a61c0d2aa09128a7561026bfcaf208461a33d8f0a.png)

](https://git-scm.com/)

安装好，点击cmd 并进入代码的文件夹cd nameoftheproject

![](https://storage.googleapis.com/papyrus_images/0c294a1201f61689d567f04ae31a39d91ade126c845d1cdc5991c0df57a7dbf3.png)

输入：git init

![](https://storage.googleapis.com/papyrus_images/d76a18d52cc9e799c5c5fe4878284222625a17bd8599b57fd166e553b438bea3.png)

输入：git add . (别忘后面的点）会自动检测到文件夹里面的所有文件

![](https://storage.googleapis.com/papyrus_images/ebbbcf3ce46229a4ecc9a62ba0d009663dc23b1d92d3470e69c266d2ef400553.png)

输入git config --global user.email "这里填你自己的github账号邮箱"

![](https://storage.googleapis.com/papyrus_images/2780b342402b5ad8485d100efedb33055c25d5d6fc01a9d4dc6bbb9ba30beeb5.png)

输入git commit -m "first nameoftheproject" 会打包好文件

![](https://storage.googleapis.com/papyrus_images/0b064d65bc25f1fb7cf5a349dfdd278f90793c37c6116d56d44ee8c0b188c5db.png)

输入git branch -M main

输入git remote add origin [https://github.com/你的账号/仓库名字.git](https://github.com/%E4%BD%A0%E7%9A%84%E8%B4%A6%E5%8F%B7/%E4%BB%93%E5%BA%93%E5%90%8D%E5%AD%97.git)

![](https://storage.googleapis.com/papyrus_images/7683d444c4b823fea0d18842cd7355d4eae1882e456c251d2940471ee446e18d.png)

最后输入git push -u origin main 应该是上传的意思

会弹出窗口，点击确定，然后进行连接！输入密码，就会上传成功

![](https://storage.googleapis.com/papyrus_images/7ae6a80539bd510c70c3d92b9bdbc1699a8a2f8d3ec784560bf195f48f6aee6c.png)

最后看下github里面有这个上传的代码文件没，，显示就代表完成了！

![](https://storage.googleapis.com/papyrus_images/e157b99fed8495dba5ebedb33fdf82a1c4f2224c14de68f7f6ebee279ba3d794.png)

希望多多关注推特相互学习

---

*Originally published on [lingge-twitter@shangdu2005](https://paragraph.com/@lingge/alchemy-github)*
