如何将修改后的文件推送到github
% git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
# directory)
# modified: login.php
no changes added to commit (use "git add" and/or "git commit -a")
最佳答案
git status
它将在工作树中显示所有修改过的文件和新文件
modified: file path
未跟踪的文件:Git 不跟踪的文件
用于添加未跟踪文件
git add <file path>
添加文件后需要提交
git commit -m "< your message>"
只提交修改后的文件
git commit -m "<your message>" <file_path 1> <file_path2>
推送代码到git
git push <origin> <branch_name>
更新远程引用以及关联的对象
有关更多详细信息,请阅读 documentation
关于git - 如何将这个修改后的文件推送到github存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35559968/