I have clone a Repository called MyRepo Contains (a,b,c,d) files and It's updated with (a,b,c,d,e,f,g,h)files. Now how do i Clone Updated Repository (I'm just removing old repo. and reinstalling the updated repo. Is there any option to clone updates without deleting total repo?)
-
Possible duplicate of [Updating a local repository with changes from a Github repository](https://stackoverflow.com/questions/1443210/updating-a-local-repository-with-changes-from-a-github-repository) – phd Feb 11 '19 at 12:57
-
https://stackoverflow.com/search?q=%5Bgit%5D+update+local+repository – phd Feb 11 '19 at 12:57
4 Answers
Cloning is something you usually do only once. Since you already cloned your repo, a way to update your files locally with changes introduced in the origin (server) is to use git pull
.
I recommend reading at least about git basics here: https://git-scm.com/book/en/v2 This book is really well-written, available for free and in many different languages.

- 753
- 5
- 21
I think you are saying that you have cloned your remote git repo to your local system and updated local system repo and want to add this to remote again right.
so, you can push your updated local repo on remote git repo. you just have to git add . and commit and push.

- 156
- 4
- 15
-
No I just want to install updates from From the Repo . . I'm not changing anything I'm trying to install changed/updated Repository. – karthik oggu Feb 11 '19 at 10:47
Run the command 'git pull' from an already cloned repo to get updates
You can take a look at gitexplorer.com, it's a web app that helps with git commands

- 171
- 1
- 5
So you have cloned a repository and updated the original afterwards.
To update your cloned repository you can add it as a remote to your updated origin repository by using git remote add nameOfRemote "pathofclonedrepo"
. If this works you can update the remote via git push nameOfRemote master
or git push nameOfRemote HEAD
.
If you really want to clone your repo again (not recommended) without deleting the old clone, you only have to repeat clone
with a new path.

- 76
- 4