Can I copy a Git working copy onto another machine?

I am in the process of creating a Git working copy from our SVN server with ‘git svn clone’. But this takes quite some time (we have > 20.000 revs and almost 10.000 files). I have some other machines (for other developers) that I would like to setup the same way. Will it be possible to copy the resulting files from the first machine onto others, so as to spend less time?

In other words, is there anything in a Git working copy that ties it to the machine it was created on?

  • Git checkout fails with detached worktree
  • How to git stash changes in current folder
  • How to “git show” on a remote repo?
  • git request-pull: how to create a (github) pull request on the command line?
  • Git push/pull paths not working to windows origin running msysgit + cygwin sshd
  • How to apply SVN diff to Git?
  • Thanks.

  • bitbucket unable to merge, this field is required
  • What is git-daemon?
  • Git keep some local changes clean but do not push them
  • Pulling a branch from origin merged it into my local branch and I need to revert that
  • git difftool runs git diff
  • publish to multiple remotes using Github for Windows
  • 3 Solutions collect form web for “Can I copy a Git working copy onto another machine?”

    You can copy it, everything is inside the .git folder and is not dependant on anything else.

    It’s also worth mentioning that if you have no local changes (“git status” doesn’t show anything you want to keep), you can copy only the .git directory and do a “git checkout .” from the (almost-empty) repository root directory at the end.

    If it’s a slow link it may also be worth repacking the repository before the transfer.

    The only thing I worry a little bit about is if git-svn remembers some user information that you don’t want to copy to the other developers.

    Nope, it’ll be fine to just copy the repo’s root directory. Just make sure you get any invisible files, too, especially the .git directory (in the project’s root) which contains all the config information for the repo.

    Git Baby is a git and github fan, let's start git clone.