I have cloned the repository locally using the command,"git clone repository-url" to my local machine.Now suppose if there is any changes in the repository,How do I update it in local machine.Is there any command to do it? another command 'git status' gives me the info of the repository is updated or not.but how do i update my local repository folder with the new change. Cloning again is not possible. Any help would be appreciated
Asked
Active
Viewed 424 times
0
-
2`git pull` is what you need – Marvin Fischer Feb 28 '18 at 08:00
-
"fatal: Not a git repository (or any of the parent directories): .git"This is the error I have getting on 'git pull' – user123 Feb 28 '18 at 08:10
-
In the same directory where you can execute `git status`? Is there a `.git` folder? – Marvin Fischer Feb 28 '18 at 08:13
-
1Please use it inside the directory created by the clone. – Uwe Plonus Feb 28 '18 at 08:13
-
This question is not a duplicate as the other question assumes that the user already knows that everything must be in the correct folder... – Uwe Plonus Feb 28 '18 at 12:37
1 Answers
1
To answer your basic question: You need to execute git pull
inside the folder created by the git clone
.
Example for clone:
git clone https://gitserver/repository.git
This creates a folder named repository
.
To update you have to change into the folder created and issue a git pull
:
cd repository
git pull

Uwe Plonus
- 9,803
- 4
- 41
- 48