每次Github push前都必须繁琐的add文件然后commit吗?

2025-05-05 00:41:06
推荐回答(2个)
回答1:

加入 -a 就可以了
git commit -a

回答2:

git diff 对比文件的差异

git branch 列出所有分支

git log 显示提交记录

分支
git brach 分支名 创建分支
git checkout 分支名 切换分支

提交
git add 跟踪新文件或者已有文件的改动,或者用来解决冲突
git commit 把文件从stage提交到branch

删除
git rm 文件名 不但从stage中删除,同时删除物理文件