Answer the question
In order to leave comments, you need to log in
Git pull not working?
Hello.
I created a remote and local repository.
Created a README.md file in the local repository and pushed it to the remote one.
I deleted a file in the local repository and I want to return it from the remote one again.
Writing:
PS D:\VS\UnknownEngine> git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: README.md
no changes added to commit (use "git add" and/or "git commit -a")
PS D:\VS\UnknownEngine> git pull
Already up to date.
PS D:\VS\UnknownEngine> git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: README.md
no changes added to commit (use "git add" and/or "git commit -a")
PS D:\VS\UnknownEngine> git fetch origin
PS D:\VS\UnknownEngine> git merge origin/master
Already up to date.
PS D:\VS\UnknownEngine> git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: README.md
no changes added to commit (use "git add" and/or "git commit -a")
Answer the question
In order to leave comments, you need to log in
Because pull pulls new commits from the remote repository. There are no new commits there.
I deleted a file in the local repository and I want to ... return it.
use " git restore ..." to discard changes in working directory
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question