git-clone

How to update a git clone --mirror?

﹥>﹥吖頭↗ 提交于 2019-11-27 05:49:36
I have created a git repository to mirror a live site (which is a non-bare git repository): git clone --mirror ssh://user@example.com/path/to/repo Now, to keep this mirror clone updated with all changes from its remote origin, which command or commands I must use? I'd like to keep everything updated: commits, refs, hooks, branches, etc. Thanks! This is the command that you need to execute on the mirror: git remote update J. Bruni Regarding commits, refs, branches and " et cetera ", Magnus answer just works ( git remote update ). But unfortunately there is no way to clone / mirror / update the

Bower install using only https?

二次信任 提交于 2019-11-27 05:43:23
I am trying to set up Bower on a build server at our organization's data center, but git 's port does not appear to be open on the data center's firewall. I can use the git command line client to clone via https://[repo] , but not git://[repo] . Is there a switch or preference which will instruct bower to perform git clone using https rather than the git protocol? I've looked at the source, and considered changing the resolution code to replace git:// with https:// , but I figured I'd ask before I go to those lengths. Sindre Sorhus You can make git replace the protocol for you. Just run: git

Git clone particular version of remote repository

余生颓废 提交于 2019-11-27 04:09:01
问题 I cloned a remote git repository about a month ago. The remote repository has undergone many changes and has now become unstable. Now I need another copy of the repository, version identical to the one I cloned a month ago. How do I do this? 回答1: You could "reset" your repository to any commit you want (e.g. 1 month ago). Use git-reset for that: git clone [remote_address_here] my_repo cd my_repo git reset --hard [ENTER HERE THE COMMIT HASH YOU WANT] 回答2: You Can use simply git checkout

Git clone with custom SSH using GIT_SSH error

泪湿孤枕 提交于 2019-11-27 03:19:23
I am trying to clone a Git repo using a custom SSH command. I set the SSH command in the GIT_SSH environmental variably be running export GIT_SSH="/usr/bin/ssh -o StrictHostKeyChecking=no -i /home/me/my_private_key" . But when, after the previous command I run git clone git@bitbucket.org:uname/test-git-repo.git , I get the following weird error error: cannot run /usr/bin/ssh -o StrictHostKeyChecking=no -i /home/me/my_private_key fatal: unable to fork Can you please help me out solve this issue? You cannot provide options in the GIT_SSH environment variable; from the git man page: GIT_SSH If

How do I clone a GitHub wiki?

廉价感情. 提交于 2019-11-27 02:44:13
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. joseph.hainline 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. The Wiki pages are managed as a repository. So click on your repository, then on the left side click on

How to git clone a specific tag

廉价感情. 提交于 2019-11-27 02:41:11
From git-clone(1) Manual Page --branch can also take tags and detaches the HEAD at that commit in the resulting repository. I tried git clone --branch <tag_name> <repo_url> But it does not work. It returns: warning: Remote branch 2.13.0 not found in upstream origin, using HEAD instead How to use this parameter? git clone --branch <tag_name> <repo_url> This command is not supported in git 1.7.9.5. I use git 1.8.3.5 and it works Sahil kalra Use --single-branch option to only clone history leading to tip of the tag . This saves a lot of unnecessary code from being cloned. git clone <repo_url> -

BitBucket - download source as ZIP

我的未来我决定 提交于 2019-11-27 02:38:38
I know I can get the project through git clone command, but is there any way, how to download the project through the web interface from BitBucket.org ? In the best way, I am looking for a way to download a project source as ZIP compress file. Pigueiras For the latest version of Bitbucket (2016+), the download link can be found in the Download menu item. Pre-2016 First method In the Overview page of the repo, there is a link to download the project. Second method Go to Downloads -> Branches -> Download the branch that you want (as .zip, .gz or .bz2). There you'll find download links for all

How to clone all repos at once from GitHub?

拈花ヽ惹草 提交于 2019-11-27 02:32:24
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? I don't think it's possible to do it that way. Your best bet is to find and loop through a list of an Organization's repositories using the API. Try this: Create an API token by going to

git-clone and post-checkout hook

…衆ロ難τιáo~ 提交于 2019-11-27 01:57:20
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 hook is still not executed) It seems impossible that a post-checkout hook ever gets executed after a git

Visual studio 2017 with bitbucket, terminal prompts disabled

做~自己de王妃 提交于 2019-11-27 00:27:00
问题 The visual studio stopped sending my commits to the bitbucket and this error appears Error encountered while cloning the remote repository: Git failed with a fatal error. HttpRequestException encountered. There was an error submitting the request. can not spawn C / Program Files (x86) / Microsoft Visual Studio / 2017 / Community / Common7 / IDE / CommonExtensions / Microsoft / TeamFoundation / Team Explorer / Git / mingw32 / libexec / git-core / git-askpass.exe: No such file or directory