git-clone

Is it possible to do a shallow git clone based on datetime?

此生再无相见时 提交于 2019-12-01 01:35:42
问题 I know I can do a shallow clone by specifying the --depth flag. However, this takes in an integer as its value. Is there any way to have the identical behavior with a datetime ? I do not wish to clone the entire repository and checkout a previous state. 回答1: Why yes it is. At least only with Git 2.11 (Q4 2016) See commit cccf74e, commit 079aa97, commit 2997178, commit cdc3727, commit 859e5df, commit a45a260, commit 269a7a8, commit 41da711, commit 6d43a0c, commit 994c2aa, commit 508ea88,

Git: get specific revision from remote server

时光怂恿深爱的人放手 提交于 2019-11-30 23:51:18
I'm setting up a test-architecture. In this system a VM has to test a specific revision of the code. The VM is completely clean, and does not have a local (updatable) version of the repo. The code is being hosted on an on-site git server, over ssh with a user named git. I have full control over both machines. The easy solution is: git clone --no-checkout git@gitserver:reponame.git git checkout 8e8fdea8f8367f4a179d2faddbaadba495d6bc12 This works, but does too much: It transfers the full history over the network, something I want to avoid if at all possible. It seems to me from the documentation

Grit's clone method is undefined?

半城伤御伤魂 提交于 2019-11-30 21:05:49
I've recently started working on a project that uses git for storage and ruby as a front-end. The first version of my script used ruby-git, which was ok though pretty simple. When I needed to do more specific work with my commits and logs it was recommended that I move to grit. However, I've a road block early on- grit seems incapable of cloning remote repositories. All examples I've found using the Repository class create a local repository and searching through the source I've found Grit's clone method is undefined. What gives? This is my first StackOverflow question, so thanks in advance

Git: get specific revision from remote server

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 18:04:31
问题 I'm setting up a test-architecture. In this system a VM has to test a specific revision of the code. The VM is completely clean, and does not have a local (updatable) version of the repo. The code is being hosted on an on-site git server, over ssh with a user named git. I have full control over both machines. The easy solution is: git clone --no-checkout git@gitserver:reponame.git git checkout 8e8fdea8f8367f4a179d2faddbaadba495d6bc12 This works, but does too much: It transfers the full

pause git clone and resume later? [duplicate]

别来无恙 提交于 2019-11-30 12:57:05
问题 This question already has answers here : How to complete a git clone for a big project on an unstable connection? (17 answers) Closed 5 years ago . Is there a way to pause git clone and resume it later? I'm cloning a really big repo (around 2GB) and my PC's been turned on for more than 40 hours. I have school to catch later, I don't want to leave it like this. Anybody got an idea? It's already at 67% btw. :( 回答1: Assuming it's a normal git clone , I'm afraid that they're not resumable, as far

how to know the depth of a git's shallow clone?

二次信任 提交于 2019-11-30 12:47:14
If I retrieve a shallow clone, e.g. git clone --depth 10 http://foo.bar/baz.git Does git have any command to retrieve the depth of this clone? (e.g. a command that simply prints 10 ). Short answer: no. The number is not stored anywhere (unless you store it yourself—and it might be nice if Git saved it in .git/config somewhere). A repository is shallow (by Git's internal definition) if and only if the file .git/shallow exists. The contents of this file are a bit sneaky: most of Git treats it in exactly the same way as .git/grafts . That is, each line in the shallow file contains a commit hash

Clone repository into GitHub

风格不统一 提交于 2019-11-30 11:26:14
问题 I have been using git locally for while a now and have a private repository with complete change history etc. I now want to share this on GitHub, so I need to clone from my local repo into a new GitHub repo. I cannot find any way to do this. How can I get all my history up onto GitHub? 回答1: You don't need to "clone onto GitHub". You just have to create a repository on GitHub and push your changes there: $ cd your_local_repo $ git remote add origin git@github.com:USERNAME/REPO_NAME.git $ git

fatal: could not create work tree dir 'kivy'

为君一笑 提交于 2019-11-30 10:24:21
问题 I'm trying to clone my fork of the kivy git, but it's not working. I've made the fork correctly, I believe, but when I type this into my Mac terminal: git clone https://github.com/mygitusername/kivy.git I get this error: fatal: could not create work tree dir 'kivy.: Permission denied Anyone see what I am doing wrong? Thanks! 回答1: You should do the command in a directory where you have write permission. So: cd ~/ mkdir code cd code git clone https://github.com/kivy/kivy For example. 回答2: Your

Permission denied (publickey) fatal: Could not read from remote repository. while cloning Git repository

浪子不回头ぞ 提交于 2019-11-30 10:05:45
问题 I am unable to clone a Git repository, and getting this error: krishna.soni@KRISHNACHANDRAS /c/Projects $ git clone http://stage.abc.com:10088/pqr http://<url>/<repository> Cloning into '<repository>'... fatal: could not read Username for 'http://<url>': No such file or directory I've read Bitbucket, Windows and “fatal: could not read Password for”, but still have the problem. I proceeded further but am now getting this error sh.exe": chown: command not found krishna.soni@KRISHNACHANDRAS /c $

git clone heroku ssh permission denied

我与影子孤独终老i 提交于 2019-11-30 08:18:29
I just bought a new computer and I am trying to clone my heroku project on it. Here's what I've done so far. I didn't include the trace, but everything was saved in the right place, and the functions ran without errors. >> sudo ssh-keygen >> heroku keys:add >> sudo git clone -o heroku git@heroku.com:myapp.git Initialized empty Git repository in /Users/macuser/Sites/shwagr/shwagr/.git/ Permission denied (publickey). Then I heard about doing it through ssh bash.. >ssh-agent bash >ssh-add ~/.ssh Permissions 0777 for '/Users/macuser/.ssh' are too open. It is recommended that your private key files