git-clone

GIT clone repo across local file system in windows

故事扮演 提交于 2019-11-26 11:29:51
I am a complete Noob when it comes to GIT. I have been just taking my first steps over the last few days. I setup a repo on my laptop, pulled down the Trunk from an SVN project (had some issues with branches, not got them working), but all seems ok there. I now want to be able to pull or push from the laptop to my main desktop. The reason being the laptop is handy on the train as I spend 2 hours a day travelling and can get some good work done. But my main machine at home is great for development. So I want to be able to push / pull from the laptop to the main computer when I get home. I

How to git-svn clone the last n revisions from a Subversion repository?

╄→尐↘猪︶ㄣ 提交于 2019-11-26 11:27:00
Problem How do you create a shallow copy with git-svn from a Subversion repository, e.g. how do you pull only the last three revisions? The git clone command can get the last n revisions from a Git repository if you use the option --depth , i.e. you get a shallow copy of the repository. Example: git clone --depth 3 git://some/repo myshallowcopyrepo Is there a similar option for git-svn? My discoveries so far So far I've only found the -rN option where N is the revision to pull. Example: git svn clone -rN svn://some/repo According to the documentation there is the possibility to use -r

How do I clone a specific Git branch? [duplicate]

China☆狼群 提交于 2019-11-26 10:53:52
This question already has an answer here: How do I clone a single branch in Git? 15 answers Git clone will behave copying remote current working branch into local. Is there any way to clone a specific branch by myself without switching branches on the remote repository? Michael Krelin - hacker git clone --single-branch --branch <branchname> <remote-repo> The --single-branch option is valid from version 1.7.10 and later. Please see also the other answer which many people prefer. You may also want to make sure you understand the difference. And the difference is: by invoking git clone --branch

How do I clone a GitHub wiki?

谁都会走 提交于 2019-11-26 10:08:20
问题 How do I clone my GitHub repository\'s wiki? I know it\'s saved as a separate Git repository, but I can\'t remember the path. I\'ve tried ...reponame/wiki.git and ...reponame.git/wiki , but neither are correct. 回答1: Append .wiki.git to the repository name. That is, if your repository name was foobar : git clone git@github.com:myusername/foobar.git would be the path to clone your repository and git clone git@github.com:myusername/foobar.wiki.git would be the path to clone its wiki. 回答2: The

How to clone all repos at once from GitHub?

走远了吗. 提交于 2019-11-26 10:07:43
问题 I have a company GitHub account and I want to back up all of the repositories within, accounting for anything new that might get created for purposes of automation. I was hoping something like this: git clone git@github.com:company/*.git or similar would work, but it doesn\'t seem to like the wildcard there. Is there a way in Git to clone and then pull everything assuming one has the appropriate permissions? 回答1: I don't think it's possible to do it that way. Your best bet is to find and loop

How to clone git repository with specific revision/changeset?

折月煮酒 提交于 2019-11-26 09:11:40
How can I clone git repository with specific revision, something like I usually do in Mercurial: hg clone -r 3 /path/to/repository CB Bailey 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 Stackexchange for a exmple of how to activate the configuration option. UPDATE 1 For Git versions 1

Unable to Connect to GitHub.com For Cloning

允我心安 提交于 2019-11-26 08:43:00
问题 I am trying to clone the angular-phonecat git repository, but I am getting the following message when I enter the command in my Git Bash: $ git clone git://github.com/angular/angular-phonecat.git Cloning into \'angular-phonecat\'... fatal: unable to connect to github.com: github.com[0: 204.232.175.90]: errno=No error 回答1: You are probably behind a firewall. Try cloning via https – that has a higher chance of not being blocked: git clone https://github.com/angular/angular-phonecat.git 回答2: You

git-clone and post-checkout hook

随声附和 提交于 2019-11-26 08:28:51
问题 According to the manual, the post-checkout hook is run after a git checkout (just as expected) but also after a git clone (unless you pass --no-checkout ). Very well, now, considering the following: you don\'t have a local repository before a git clone hooks are not synced between remotes hooks stored in a custom template directory used with --template are copied non-executable and therefore not executed after git clone (that is actually not true as stated by Jefromi in his answer, but the

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

我是研究僧i 提交于 2019-11-26 06:54:41
问题 I am trying to git clone the LibreOffice codebase, but at the moment I have an internet connection of about 300kbps and it\'s just anything but stable. I can get the connection back any moment, but then the git clone process already stopped working, and no way to get it running again. Is there some way to have a more failure-resistant git clone download? One option I considered myself is to download someone else\'s .git directory, but that is overly dependent of others and doesn\'t seem like

git hooks : is there a clone hook?

落爺英雄遲暮 提交于 2019-11-26 05:36:28
问题 We want to store some meta-information about the commit in an external database. During a clone or a checkout, this database should be referred and we copy the meta information to a file in the repo which is cloned. The database is required rather than just using a file is for the sake of indexing and searches etc ... I thought if there is a clone hook, we could trigger this. I couldn\'t find the clone hooks in the sample in .git/hooks. is there one? is post-checkout hook the only possibility