-1

I don't know the right words so I am having trouble finding the solution.

I git clone a repository in github from my computer. and now there is an updated one in github and I want to copy it to my computer.

when I git clone again, this is the output fatal: destination path 'myFolder' already exists and is not an empty directory.

How can I copy the latest and updated repository in github.

Sorry if this is a duplicate question but I haven't found anything.

bradrar
  • 647
  • 1
  • 8
  • 19

2 Answers2

5

You use git pull to get the latest commits from a repository.

Docs

Cosmin
  • 478
  • 1
  • 5
  • 16
1

git pull is the command you should use. In future as well if there are new updates available, you don't have to checkout your code every time. git pull should pull the all the latest code from master branch to your local repository.

hope this clarifies your queries.

Rmahajan
  • 1,311
  • 1
  • 14
  • 23