git push origin master说我编辑过的所有最新版本&提交的文件

时间:2012-01-25 11:31:37

标签: git github

我编辑了2个文件并执行了git操作。

git add script.html script.js script.css
git commit -m "Updated"
git status
# On branch gh-pages
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   index.html
#
no changes added to commit (use "git add" and/or "git commit -a")

git push origin master
Everything up-to-date

为什么在我编辑文件时会显示所有内容最新?我无法看到github中反映的变化。

1 个答案:

答案 0 :(得分:0)

这里的问题是您在gh-pages上执行了提交,而不是在master上执行了提交。如果您按gh-pages,它将推送您提交的更改。