git-clone

Why does Heroku fail to detect Node.js buildpack?

我只是一个虾纸丫 提交于 2019-11-28 22:49:36
I git cloned a Node.js application (the version specified in the package.json being 4.1.2 and that of my local machine being 6.2.2 ) and tried to git push on Heroku. But it failed to build and gave this error: Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz Now I set the buildpack to heroku/nodejs and I get this message: Buildpack set. Next release on lit-badlands-92088 will use heroku/nodejs. Run git push heroku master to create a new release using this buildpack. Now when I run git push heroku master , I am again told: remote: ----

Git repository on ftp server

馋奶兔 提交于 2019-11-28 20:42:05
I have ftp server and I cannot install additional software on it. Is it possible to create on it git repository and clone to local pc? I tried to create local repository and copied it to ftp. Will it work? How can I clone from ftp server? Mark Longair There are various other questions on StackOverflow that discuss this subject, e.g.: Git fails to push to ftp-server Does GIT support push to an ftp server? ... which might have a solution that's suitable for your case. You don't say what operating system you're using, but if it's Linux-based what I would try is to mount the FTP server as part of

Why do some repository URLs end in .git while others don't?

自闭症网瘾萝莉.ら 提交于 2019-11-28 19:08:46
When I clone a repository, is there any difference between these two URLs? Without .git extension: git clone http://foo/repo With .git extension: git clone http://foo/repo.git The convention is that the .git extension should be used for bare repositories, and left off of directories with a working tree. Git doesn't really care, but has a few convenience methods that make this fairly transparent. For example, if you have a repository named /tmp/foo.git and you call git clone file:///tmp/foo , Git will first try to find /tmp/foo . If it doesn't exist, it will try /tmp/foo.git instead. This does

How do I shallow clone a repo on a specific branch?

时间秒杀一切 提交于 2019-11-28 18:13:26
问题 How do I shallow clone a git repository, so that my clone contains only 1 history item, and starts on a specific branch? I know how to do a shallow clone: git clone --depth 1 https://path/to/myrepo.git but not start the clone on a specific branch. 回答1: To clone repo foo.git with branch bar do: git clone --depth 1 https://path/to/repo/foo.git -b bar See the git-clone documentation: https://www.kernel.org/pub/software/scm/git/docs/git-clone.html 来源: https://stackoverflow.com/questions/21833870

Git svn clone: How to defer fetch of revision history

我们两清 提交于 2019-11-28 17:50:56
I often have the case that I want to work on a SVN repository right away. But an ordinary git svn clone [url] also clones the entire history. So I want to speed things up. The first part is to fetch only the last revision into your Git repository. I do it like so: URL=http://google-web-toolkit.googlecode.com/svn/trunk/ REV=`svn info $URL |grep Revision: | awk '{print $2}'` PROJECT_FOLDER=google-web-toolkit-readonly git svn clone -r$REV:HEAD $URL $PROJECT_FOLDER (more info in the StackOverflow article: "How to git-svn clone last n revisions from svn" This way I'm up and running and can work

Trying to heroku git:clone after heroku fork yields an empty repository

∥☆過路亽.° 提交于 2019-11-28 17:47:03
问题 I just ran: $ heroku fork -a oldapp newclonedapp and it worked fine and runs etc. Now I want to pull the code down to work on it [I realize heroku is not for version control and I usually use github for this but in this case I need to get the code from the clone] and when I try: $ heroku git:clone -a newclonedapp I get: warning you have appeared to have cloned an empty directory and the new newclonedapp directory is empty indeed. what am I doing wrong? 回答1: You're not doing anything wrong, it

Clone just the stable and one other branch in git?

↘锁芯ラ 提交于 2019-11-28 16:51:38
问题 I'm just getting started with git and I have a question. My app has 10 other developers working on it, each one having their own branch like dev_XXXXX. So if I do a clone of the repository, do all of their code gets copied to my machine? In that case I dont want that. Suppose my branch is dev_swamy, how do I then clone just the stable branch and dev_swamy? Thanks. 回答1: By default git clone would fetch all branches, but those branches would be stored as remote-tracking branches: for example

Retrospectively add --recursive to a git repo

一曲冷凌霜 提交于 2019-11-28 16:18:37
If you git clone with --recursive , you can get all the git submodules too. If I've forgotten to add this magical flag when cloning, as can happen, how do I now go and get any submodules? Additionally, how can I set the recursive flag as a default for future clones? You can do it with this after a simple top-level clone: git submodule update --init --recursive I would not recommend making clone do this by default. The proper way to do this if you are using submodules aggressively for development and not just linking to 3rd party OSS libs on github that you may upgrade once in a blue moon, is

How to clone git repository from its zip

☆樱花仙子☆ 提交于 2019-11-28 16:16:46
问题 I'm trying to clone a remote repository on github, but it is big and my connection doesn't seem to be stable enough, so I can't clone it successfully. But I have successfully downloaded the .zip of the repository. Is there a way to use this zip as it was created by git clone, so I can push, pull etc..? 回答1: A related post here provides the information needed to grab the .git directory and simplify the answer that umläute provided: Grab the .git directory by cloning a bare repository $ mkdir

How can I 'git clone' from another machine?

末鹿安然 提交于 2019-11-28 16:04:51
On one machine (IP address 192.168.1.2), I create a Git repository by $ cd /home/hap/working $ git init $ (add some files) $ git add . $ git commit -m 'Initial commit' And I have another machine on the same Wi-Fi network. How can I get clone from the other machine? Josiah You need to use a git+ssh URL to perform the Git cloning: git clone git+ssh://hap@192.168.1.2/~/working To break it down: git+ssh tells Git that you want to use ssh to connect to the Git repository. hap is your username (I assume based on the home directory in your question). 192.168.1.2 is the machine that you want to