有类似的问题,但我找不到任何可以解决问题的答案。
git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
我将本地更改撤回到上次提交的原始状态:
git reset --hard origin/master
确保它是最新的:
git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
然后在文件中做一个小的修改。
git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: test.py
no changes added to commit (use "git add" and/or "git commit -a")
和往常一样,我这样做:
git add test.py
git commit -m "updating test.py"
git push -u origin master
这使:
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 281 bytes | 281.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: Internal Server Error
Everything up-to-date
但是,在 github 页面上看不到更改。现在,git status给出:
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
有人可以帮忙吗?