Git clone without .git directory

Use git clone –depth=1 –branch=master git://someserver/somerepo dirformynewrepo rm -rf ./dirformynewrepo/.git The depth option will make sure to copy the least bit of history possible to get that repo. The branch option is optional and if not specified would get the default branch. The second line will make your directory dirformynewrepo not a Git repository any … Read more

Git: Permission denied (publickey) fatal – Could not read from remote repository. while cloning Git repository

For people that come here that are just trying to get the repository but don’t care about the protocol (ssh / https), you might just want to use https instead of ssh (if it’s supported). So for example you use git clone https://github.com/%REPOSITORYFOLDER%/%REPOSITORYNAME%.git instead of git clone git@github.com:%REPOSITORYFOLDER%/%REPOSITORYNAME%.git Note that GitHub deprecated password authentication (https … Read more

git clone from another directory

cd /d c:\ git clone C:\folder1 folder2 From the documentation for git clone: For local repositories, also supported by git natively, the following syntaxes may be used: /path/to/repo.git/ file:///path/to/repo.git/ These two syntaxes are mostly equivalent, except the former implies –local option.

How to complete a git clone for a big project on an unstable connection?

Two solutions (or rather workarounds) that come to mind are: Use shallow clone i.e. git clone –depth=1, then deepen this clone using git fetch –depth=N, with increasing N. You can use git fetch –unshallow (since 1.8.0.3) to download all remaining revisions. Ask somebody to bundle up to some tagged release (see git-bundle(1) manpage). The bundle … Read more

Is it safe to shallow clone with –depth 1, create commits, and pull updates again?

Note that Git 1.9/2.0 (Q1 2014) has removed that limitation. See commit 82fba2b, from Nguyễn Thái Ngọc Duy (pclouds): Now that git supports data transfer from or to a shallow clone, these limitations are not true anymore. The documentation now reads: –depth <depth>:: Create a ‘shallow’ clone with a history truncated to the specified number … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)