Git 上传代码
如果你想确认当前状态,可以执行:
git status
- 如果显示
working tree clean
,说明没有未提交的更改。 - 如果有修改但没提交,会提示你先
git add
和git commit
。
如果你想推送新的代码,步骤是:
- 修改或新增文件
- 执行
git add .
- 执行
git commit -m "你的提交信息"
- 执行
git push origin main
git status
working tree clean
,说明没有未提交的更改。git add
和 git commit
。git add .
git commit -m "你的提交信息"
git push origin main