3

I'm really sorry if this has been asked before, my searching skills are bad.

So I want to update my github repo with my local code, but it always says "Everything up-to-date" So I have one file I modified, and I try

  • git add Main.cs
  • git commit -m 'Commit'
  • git push origin master

But it still says Up-To-Date even though the file on my local system is different than the one on the repo.

Thanks in advance

4

1 回答 1

1

在我看来,您可能有配置问题。

的输出git config --list --local应该包含这个

remote.origin.url=https://github.com/myname/repo.git 
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master

你绝对应该有branch.master. 另外,请注意https://.remote.origin.url

我建议使用此命令编辑您的配置以包含四行

git config --local --edit

当您手动编辑文件时,它应该如下所示

[remote "origin"]
    url = https://github.com/myname/repo.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
于 2013-06-07T18:55:40.877 回答