I just cancelled a git-clone while it was receiving objects, using ^C on my Mac OSX 10.6.8. Git had already download 1.2GB, according to the "receiving objects" line. I'd like to remove these files, since that's a big chunk of memory, but I can't find them anywhere.
The folder I was cloning them to hadn't been created yet, and there is no obvious .git-xyz folder in the parent directory that could hold them.
Any thoughts? Or are they just in some OS-defined temporary folder and will get cleaned up automatically at some point?
Once an item is in the git history, it is there permanently. Even if a later commit deletes the file, the file will still be present in a git clone because a git clone contains the full history (because Git is a distributed version control system).
The "clone" command downloads an existing Git repository to your local computer. You will then have a full-blown, local version of that Git repo and can start working on the project. Typically, the "original" repository is located on a remote server, often from a service like GitHub, Bitbucket, or GitLab).
No it does get the full history of the remote repository.
git clone downloads all remote branches but still considers them "remote", even though the files are located in your new repository. There's one exception to this, which is that the cloning process creates a local branch called "master" from the remote branch called "master".
If Git is not able to clone due to a weak connection, it would display a fatal error and the user is requested to try again until the above message does not appear. Confirm the cloning by listing the directories once again using the ls command which lists all the files and folder.
First of all, the git clone command is used to target an existing repository and clone or copy it in a new directory. A local copy stored on a server, that is accessible at example.com can be obtained using the SSH username x_person, like this:
The most common ones are presented below: git clone -branch ¶ The -branch argument specifies a branch which should be cloned instead of the one the remote HEAD is... git clone --bare ¶ With the --bare argument passed to git clone, you will have a copy of the remote repo created with an... git clone ...
git clone --bare ¶ With the --bare argument passed to git clone, you will have a copy of the remote repo created with an excluded working directory. So, the repository will be created with the project history which can be pushed or pulled from but cannot be edited. git clone --mirror ¶
as one of the commenters said, for a git clone git://foosite/fooproj, git will create a directory called fooproj/.git and download all the repo files into there.
the second stage of clone is a "checkout" of the origin/master branch usually, but since your ctrl-c was caught by the app, the directories were likely deleted, and no checkout was done.
i.e. if
$ ls -a fooproj
doesn't yield anything, then the files were already deleted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With