I cloned a git repo into my pc using this command in my git bash
git clone https://github.com/xxx/yyy.git
which created a folder called yyy in my pc.
How can I update the folder yyy in my pc with new contents of the https://github.com/xxx/yyy.git (is it called remote repo)?
I followed the instructions in Updating a local repository with changes from a Github repository, in particular git pull origin master
but none of them worked and returned the error $ git pull origin master
fatal: Not a git repository (or any of the parent directories): .git
.
I also tried git pull https://github.com/xxx/yyy.git
as I reasoned that if I successfully did git clone https://github.com/xxx/yyy.git
, the git pull https://github.com/xxx/yyy.git
must work otherwise git syntax is not great.
Should I do the "clone" again to overwrite the existing folder in my pc? Why can't I do "pull"?
You need to issue git commands from within the cloned repository:
cd yyy
git pull
You are probably executing this command from outside the yyy folder. You have to go into it first:
cd yyy
git pull
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With