简体   繁体   中英

Git pull not updating the last commit from remote

On the remote master, the repo has 3 commits ahead my local commit. I am trying to pull the latest commit.

$git checkout master
$git pull origin master
Current branch master is up to date.

then I have tried fetch

$git fetch origin master:master
fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
fatal: the remote end hung up unexpectedly

I also tried reclone this repo, but I still lost last 3 commits. Please let me know if you need provide any more information. Thanks for helping.

It works if you instead of
$ git pull
Type
$ git pull [remote] [local-branch> </code]Iit works if you instead of
$ git pull

$ git pull [remote] [local-branch> </code]

您可以粘贴 "git status" 、 "git log --graph --decorate --all" 的输出作为附加输入。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM