top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to change directory of git repository

+1 vote
206 views

There must be some quick fix but I just can't figure out how to do it:

I initialized a git repository on my local computer, but unfortunately at the wrong place, i.e. in the wrong directory. How can I undo this or move the working directory that my git repository is synched with?

In my example, instead of initializing my repository in /home/git/rep1, I initialized it in /home ... :S

posted Jun 9, 2015 by Sidharth

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

How to configure a read-only copy of a remote Git repository on a local server in bare mode and automatically synchronize its contents.

I need to configure a mirror of the repository hosted at another location and the mirrored repository should automatically perform syncing of code at regular intervals.

0 votes

I have a given server repository at location, let say "A" (URL) I have a new empty repository at another location, let say "B" (URL)

I WOULD LIKE TO COPY ALL CONTENT FROM A TO B.

  • In a local clone of B I did a "git pull A" but I've got the "master" branch only.
  • In a local clone of B I cannot say "git pull --all A"

COULD YOU PLEASE PROVIDE THE SINGLE STEPS ON HOW TO DO THIS?

  • please: not rsync like stuff, I would prefer the git way -> I hope there's one
  • please: a few comments would be great
0 votes

As far as I can tell, there is no way I can create remote git repository from command line (git.exe in windows). if I am not mistaken shall you tell me why such limitation exist given that git is an old and mature project.

...