cd D:\laragon\www\engine-api
# 1. 查看当前修改
git status
# 2. 添加所有修改
git add .
# 3. 提交到本地仓库
git commit -m "feat: 安装 Laravel Breeze 后台认证"
# 4. 推送到 GitHub
git push origin main
注意事项 git add .
可能会出现如下警告
warning: in the working copy of 'package.json', CRLF will be replaced by LF the next time Git touches it
这个警告不影响提交,只是 Git 在提醒您换行符格式会有变化(Windows 的 CRLF 会被替换成 Linux 的 LF)
如果想消除这个警告
可以配置 Git 自动处理:
git config --global core.autocrlf true
而git config --global 是全局配置,在整个电脑上生效,不依赖项目目录