git-clone

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

依然范特西╮ 提交于 2019-12-03 11:31:13
问题 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? 回答1: Cloning a repository gives you a copy of that repository and

the git clone is empty? why this happens

家住魔仙堡 提交于 2019-12-03 10:57:35
问题 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

How to config SSH for gitlab?

北战南征 提交于 2019-12-03 09:57:28
问题 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? 回答1: 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

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

ぃ、小莉子 提交于 2019-12-03 08:48:33
问题 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 回答1: OP wanted to retrieve all versions, but the answers would not deliver. Especially if the file has hundreds of revisions (all suggestions are

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

我与影子孤独终老i 提交于 2019-12-03 08:16:23
问题 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? 回答1: From your link: It works by letting users record fake ancestry information for commits

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

∥☆過路亽.° 提交于 2019-12-03 08:06:23
问题 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. 回答1: 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. 回答2: Use the GitHub Network Graph to

gitlab: git clone https with large repos fails

大兔子大兔子 提交于 2019-12-03 07:37:34
When trying to clone a large repo (~700MB) over https, git fails with: c:\git-projects>git clone https://git.mycompany.de/fs.git Cloning into 'fs'... Username for 'https://git.mycompany.de': mwlo Password for 'https://mwlo@git.mycompany.de': efrror: RPC failed; result=22, HTTP code = 500 atal: The remote end hung up unexpectedly clone over ssh works: c:\git-projects>git clone git@git.mycompany.de:fs.git Cloning into 'fs'... remote: Counting objects: 144564, done. remote: Compressing objects: 100% (30842/30842), done. remote: Total 144564 (delta 95360), reused 143746 (delta 94542) Receiving

What to do after cloning repo from git

本秂侑毒 提交于 2019-12-03 07:20:36
I am just a git starter , basically I clone a git repository and now I wanted to commit the changes that I made in a file. when I run the command git commit it says not a git repository , So being a starter in git i just wanted to ask that do i need to run this command first - git init and then git commit ? Or in between these some more steps to follow to commit the file? I need to commit files on Bitbucket. Screenshot- David Culp As jeremyharris said, the git documentation site and especially the online book there will get you up to speed on the basics. A few quick notes that might get you

Git cloning a repository that is already a clone

早过忘川 提交于 2019-12-03 06:25:44
I am not sure whether this is a dumb question, but are there any ill side-effects to do a git clone of a repository that is already clone of another remote repository? There's no side effects but you should understand exactly what happens when you clone a repository. Some theory The "problem" is that when you clone a repository "the normal way"—that is, without any funky knobs adjusted when calling git clone —you do not end up with a repository which is the same as the source one. It indeed contains exactly the same history but it has different branch layout. To explain it in a non-scientific

Cloning a git repo with all submodules

被刻印的时光 ゝ 提交于 2019-12-03 05:55:21
问题 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