Do I have to use git clone every time?

Viewed 4038

I am kind of new to Git and I am not sure how to work with it.

Currently, I have a git in a remote server. I am trying to connect my computer to this git repository. From what I have read online, it is best to use clone for this purposes. Now, I have made some changes in my repository on the remote server. I would like to update them on my own computer.

I have tried to use pull but it did not seem to do anything. I have tried fetch and still nothing.

It is only when clone the repository again that I have seen those changes. I am sure that git can just update my repository instead of having to recopy the whole thing. Thus, my question is:

Do I have to clone the git every timee time to receive changes done on the repository?

Here are my commands:

On remote git repository:

  1. peform changes
  2. git add -A
  3. git commit -m "message"
  4. git push master origin

On my own computer:

  1. git pull <server information> - does not update changes
  2. git fetch... - no update
  3. git clone --depth=1 ... - downloads the current state of the git.

To make it clear: how can I just update my computer's git rather than redownloading the current git state every time?

Thanks

1 Answers
Related