What is a difference between local and remote repository?
Answer
The local repository is a Git repository that is stored on your computer.
The remote repository is a Git repository that is stored on some remote computer.
The remote repository is usually used by teams as a central repository into which everyone pushes the changes from his local repository and from which everyone pulls changes to his local repository.
When you are finished with doing changes into your workspace, you can add them to staging area and from there you can commit the changes to your local repository. This can be done even when you are disconnected from the internet and nobody else can see the changes in your local repository.
Once you decide it's a good time to share the changes, you push the changes from your local repository to the remote repository. This copies the changes from .git folder on your local computer to .git folder on the remote computer. From this moment, your changes are visible to people who have access to the remote repository.
They can pull your changes from the remote repository to their local repository and then integrate the changes into their workspaces.
In similar way you can pull changes of the others from from the remote repository to your local repository and then integrate the changes into your workspace.
Related Git job interview questions
How can you find out what were the most recent changes in Git repository and who made them?
GitSource control JuniorHow do you get changes from the remote repository to your computer?
GitSource control JuniorHow do you create local Git repository?
GitSource control JuniorHow do you send changes from local Git repository to remote repository?
GitSource control JuniorWhat is a Git repository?
GitSource control Junior