# git 命令学习

By [alanwang](https://paragraph.com/@alanwang) · 2023-05-27

---

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

git init 初始化仓库

之后ls -al

能看到隐藏目录 .git

gitstatus 查看当前状态

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

git add README.md

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

git commit -m ‘init‘ 提交

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

一步提交，越过add

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

查看当前分支

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

创建分支

git checkout -b feature/installation

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

---

*Originally published on [alanwang](https://paragraph.com/@alanwang/git)*
