git-clone

How to specify registry while doing npm install with git remote url?

假装没事ソ 提交于 2019-12-03 05:50:38
I want to be able to clone a git repository using a URL as specified here <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish>] I am getting an error saying npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/XYZ So I should also be able to specify the registry while doing since modules are supposed to be picked up from a internal repository. Is it possible to specify registry while doing npm install with git remote url ? Alexandr Lazarev npm gets its config settings from the command line, environment variables, and npmrc files. You can try to

How to make git clone faster with multiple threads?

江枫思渺然 提交于 2019-12-03 04:46:01
问题 My internet speed to github was never fast, and it's lingering at 50kb/s (my internet speed is 20mbit which is not very fast but still much faster than this). The repository is multi-gb by my estimates, so it'll take a very long time. Does git support downloading the objects using multiple-threads so I can max-out my internet speed? 回答1: You can at least try and mitigate the issue, with a shallow clone (meaning not cloning the all history): git clone --depth 1 <repository> Make sure to have a

What's the difference between cloning and copying a git repo?

喜夏-厌秋 提交于 2019-12-03 02:56:39
The same question exists for mercurial , and I'm wondering how this applies to git? In particular, I'm interested in cases where there are two local repos, and copying between servers using rsync or such. Also, if the original repo is itself cloned from, say gitorious, and I copy it, then gitorious will still exist as a remote (tracked by the master branch) in the copy, right? Does this happen if the copy is cloned instead? Cloning a repository gives you a copy of that repository and configures the original repository as a remote. Copying a repository just gives you a copy of that repository.

What exactly is a “grafted” commit in a shallow clone?

时间秒杀一切 提交于 2019-12-03 01:09:14
When doing a shallow clone in git (using the --depth option), the root commit is marked as grafted . Googling didn't lead to any satisfacting documentation. It doesn't seem to have anything to do with git grafts , which the similar terminology would imply. Is it just a flag to signal that this commit actually has more parents and isn't the "real" root commit? Or is there something more special about it? From your link: It works by letting users record fake ancestry information for commits. This way you can make git pretend the set of parents a commit has is different from what was recorded

git - getting ALL previous version of a specific file/folder

岁酱吖の 提交于 2019-12-03 00:25:38
I want to retrieve all previous version of a specific file in a git repository. I see it is possible to get one specific version with the checkout command, but I want them all. And the git clone command with the depth option doesn't seem to allow me to clone subfolder ("not valid repository name"). Do you know if it is possible and how? Thank you OP wanted to retrieve all versions, but the answers would not deliver. Especially if the file has hundreds of revisions (all suggestions are too manual). The only half-working solution was proposed by @Tobias in the comments, but suggested bash loop

Git pull fatal: Out of memory, malloc failed

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 23:57:25
I've a repo on https://bitbucket.org/ Few days ago by a mistake big number of image files were pushed in the repo. then files were deleted via another push. after that repo worked ok, but today when i try to pull from the repo: $ git pull Password for 'https://repo@bitbucket.org': warning: no common commits remote: Counting objects: 4635, done. remote: Compressing objects: 100% (1710/1710), done. fatal: Out of memory, malloc failed (tried to allocate 4266852665 bytes) fatal: index-pack failed I've tried: 1) git config --global pack.windowMemory 1024m 2) $ git count-objects -v count: 9 size: 48

the git clone is empty? why this happens

不羁岁月 提交于 2019-12-02 23:54:37
This always perplexes me. I was cloning this git clone https://android.googlesource.com/kernel/msm.git And It seemed to be cloning resolving and receiving objects etc for long . Then when it is done... git clone https://android.googlesource.com/kernel/msm.git Cloning into msm... remote: Counting objects: 1636832, done remote: Total 1636832 (delta 1367313), reused 1636832 (delta 1367313) Receiving objects: 100% (1636832/1636832), 324.89 MiB | 331 KiB/s, done. Resolving deltas: 100% (1367314/1367314), done. I open the msm directory to find it empty. This has happened before. Any one has an

How to config SSH for gitlab?

爷,独闯天下 提交于 2019-12-02 23:08:29
In my experience of Github, I tought that I need to clone a repository with my user like user@gitlabhost.com . But when I try this, then it does not recognize my password from gitlab. Only cloning with gitlab user does work. Can anybody please help me??? - How do I have to configure gitlab access right? Litmus If you followed Installation Instructions of gitlab, then you must have installed it on an linux box under the user named git . Typically in a folder like this /home/git/gitlab Hence you should use git@gitlabhost.com I am not sure what you mean by "configuring SSH". But since each user

Is it possible to find out the users who have checked out my project on GitHub?

时光毁灭记忆、已成空白 提交于 2019-12-02 21:39:12
I'm wondering if there is any way to know who has checked out my project hosted on GitHub? This would include people who have forked the project directly on GitHub, as well as people who may have cloned the repository using standard git clone commands. If by "checked out" you mean people who have cloned your project, then no it is not possible. You don't even need to be a GitHub user to clone a repository, so it would be infeasible to track this. Use the GitHub Network Graph to Track Forks You have no way to see who has checked out your repository using standard git commands such as git clone

Cloning a git repo with all submodules

隐身守侯 提交于 2019-12-02 19:18:37
I have a working git repository containing several submodules (obtained by cloning different repositories). Now, I want to copy the whole repository (with all the submodules) to a bare git repo on a different machine by either using pushing or cloning. I'm fine loosing the history of the submodules (I'm just interested in keeping their content). Is this possible ? In my attempts, in the cloned repository the submodule directory is empty. P.S. I know that this is not the correct workflow (see creating a public repo with submodules ), however there is no possibility of updating the original