Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Locally cloned repository not syncing

I have a .git repository and when a clone it, its not syncing. When i run "git branch", i’m receiving the branch "master", but that it’s not sync when i make changes in the original project folder.

how can i sync the master branch in another directory?

My directory tree:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

folder
 |_ Project
 |    |_ .git
 |
 |_ Another Folder 
 |    |_ Project
 |         |_ .git

commands that i runed:

PS c:Another Folder>: git clone "c:Project/.git"

>Solution :

For cloning a remote (or local) repository, it must be setup as "bare". Without this initial condition you can’t clone from it.

In order to clone from a local repository, you can use the following command: git clone --local {path-to-repo}. This will create a clone which you can use for regular git tasks (add, rebase, merge, push, etc.).

Note that you can also convert an existing regular (cloned) repository to a bare repository for cloning with git config --bool core.bare true.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading