git-clone

Files showing as modified directly after a Git clone

喜你入骨 提交于 2019-12-27 10:30:54
问题 I'm having an issue with a repository at the moment, and though my Git-fu is usually good, I can't seem to solve this issue. When I clone this repository, then cd into the repository, git status shows several files as changed. Note: I haven't opened the repository in any editor or anything. I tried following this guide: http://help.github.com/dealing-with-lineendings/, but this didn't help at all with my issue. I have tried git checkout -- . many times, but it seems not to do anything. I'm on

How to clone git repository with specific revision/changeset?

半城伤御伤魂 提交于 2019-12-27 10:21:33
问题 How can I clone git repository with specific revision, something like I usually do in Mercurial: hg clone -r 3 /path/to/repository 回答1: UPDATE 2 Since Git 2.5.0 the feature described below can be enabled on server side with configuration variable uploadpack.allowReachableSHA1InWant , here the GitHub feature request and the GitHub commit enabling this feature. Note that some Git servers activate this option by default, e.g. Bitbucket Server enabled it since version 5.5+. See this answer on

How to clone git repository with specific revision/changeset?

帅比萌擦擦* 提交于 2019-12-27 10:21:11
问题 How can I clone git repository with specific revision, something like I usually do in Mercurial: hg clone -r 3 /path/to/repository 回答1: UPDATE 2 Since Git 2.5.0 the feature described below can be enabled on server side with configuration variable uploadpack.allowReachableSHA1InWant , here the GitHub feature request and the GitHub commit enabling this feature. Note that some Git servers activate this option by default, e.g. Bitbucket Server enabled it since version 5.5+. See this answer on

Error while installing RVM on ubuntu 11.04. Seems to be git clone's error

别等时光非礼了梦想. 提交于 2019-12-25 02:21:42
问题 When I try to install RVM the following error shows up: $ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) Cloning into rvm... fatal: The remote end hung up unexpectedly Cloning into rvm... error: RPC failed; result=56, HTTP code = 100 fatal: The remote end hung up unexpectedly ERROR: Unable to clone the RVM repository, attempted both git:// and https:// This is a git clone error I'm getting recently. e.g When I try to clone nodejs. error: RPC failed; result=56, HTTP code = 100

How to make a visible github fork without the commit history?

戏子无情 提交于 2019-12-25 00:53:15
问题 Let's say you want to clone an old (GitHub) repository A into your own repository B . However, you don't need any branches nor do you want the very long commit history. What you want is a shallow clone as a snapshot of the most current status of the repo. Preferably with the latest commit messages, only, while still showing from what point in A it was forked from. This is graphically shown in GitHubs Insights > Network tab, as arrows going from one users repo to another. The problem is that

What's the equivalent of git clone, using git init, git remote add, git fetch etc.?

元气小坏坏 提交于 2019-12-25 00:22:51
问题 As currently I cannot clone repositories from a Bitbucket server, I've found I can still do a series of git init, git remote add etc. to get the repository on my computer. I would like to make sure I exactly produce the equivalent of a "clone". Is the following correct? git init git remote add origin -m master https://www.myserver.com/bitbucket/scm/proj/repo.git # need to do git fetch twice, otherwise for some reason git branch -r # returns "warning: ignoring broken ref refs/remotes/origin

Git clone --single-branch does not work for sha / commit ids?

谁说我不能喝 提交于 2019-12-24 10:48:43
问题 This works: git clone --branch='master' \ --single-branch \ git@bitbucket.org:teros/datavana.git but this doesn't: commit='fda0b49f81d0b67ad8a1413eca129498b9eb61db' git clone --branch="$commit" \ --single-branch \ git@bitbucket.org:teros/datavana.git the error I get is: Cloning into 'datavana'... Warning: Permanently added the RSA host key for IP address 'xx.xxx.93.1' to the list of known hosts. warning: Could not find remote branch fda0b49f81d0b67ad8a1413eca129498b9eb61db to clone. fatal:

How can I set read only access to ssh git server?

拜拜、爱过 提交于 2019-12-24 08:34:30
问题 I have a git repo on my server that I can push/pull through SSH just fine like: git clone ssh://user@domain.com/repositories/myrepo.git It prompts me with my public key passcode and I'm able to fetch or push changes to it, but I was wondering if there was a way where I could set it up so people can clone it only with read access so they don't have to enter any SSH credentials. Thanks in advance! 回答1: Not through ssh; unless you wanted to distribute a public is they could log in with, and that

concurrent git pulls to same local repository

倖福魔咒の 提交于 2019-12-24 02:40:17
问题 I've been tasked with maintaining a Jenkins server with jobs that basically check out some code and build it. Currently they do a git clone using the "--depth 1" and "-b {branch}" options to get a specific code branch as quickly as possible. But this is still wasteful since a fresh copy is being checked out (over the network) every time a job executes, even if there are very few (if any) changes. Instead, what I'd like to do is have a shared local repo on the build machine that's a clone of

Setting a password for Git cloning?

老子叫甜甜 提交于 2019-12-23 15:58:27
问题 I want to put a password to my repository so that the password is asked, when cloning from my repository. 回答1: To restrict access to repository cloning, you need to use the ssh://... protocol, and provide ssh access to only those users you want to have access. What you probably should do is look up the various "git workflow" questions and answers - they describe the means by which various team members pull/push from/to each other. There are many ways to do this. 回答2: I recomend gitosis to