git-clone

What is the fastest way to clone a git repository over a fast network connection?

浪尽此生 提交于 2020-05-24 21:18:08
问题 I have a situation with a relatively large git repository located on an elderly, slow host on my local network where it takes quite a while to do the initial clone. ravn@bamboo:~/git$ git clone gitosis@gitbox:git00 Initialized empty Git repository in /home/ravn/git/git00/.git/ remote: Counting objects: 89973, done. remote: Compressing objects: 100% (26745/26745), done. remote: Total 89973 (delta 50970), reused 85013 (delta 47798) Receiving objects: 100% (89973/89973), 349.86 MiB | 2.25 MiB/s,

How to add Server-side Custom Hooks in Gitlab?

二次信任 提交于 2020-05-17 08:52:07
问题 What I am trying to do is that i want to add my hooks to repo in server, so that whoever has cloned the repo, passes through this before pushing to Gitlab server. So far what i have done is, created pre-receive file in custom_hooks folder in /.git/custom_hooks and added some script to it. Below is my pre-receive file. #!/bin/bash zero_commit="0000000000000000000000000000000000000000" excludeExisting="--not --all" while read oldrev newrev refname; do # echo "payload" echo $refname $oldrev

How to add Server-side Custom Hooks in Gitlab?

落花浮王杯 提交于 2020-05-17 08:52:05
问题 What I am trying to do is that i want to add my hooks to repo in server, so that whoever has cloned the repo, passes through this before pushing to Gitlab server. So far what i have done is, created pre-receive file in custom_hooks folder in /.git/custom_hooks and added some script to it. Below is my pre-receive file. #!/bin/bash zero_commit="0000000000000000000000000000000000000000" excludeExisting="--not --all" while read oldrev newrev refname; do # echo "payload" echo $refname $oldrev

Git Clone is too slow

混江龙づ霸主 提交于 2020-05-09 18:24:03
问题 This is my first time to construct the git server. When I use TortoiseGit-1.8.1.0-32bit to handle the operation, everything is fine! But if i use the git clone command or git bash, the git clone process speed is so slow. I've attached two images showing the relative git clone transfer speeds below. Can anybody give me some suggestions? 回答1: Maybe you can fetch only the latest revision first and then fetch the rest: $ git clone --depth=1 git@github.com:joe/hello-world.git $ cd hello-world $

Git Clone is too slow

六月ゝ 毕业季﹏ 提交于 2020-05-09 18:23:33
问题 This is my first time to construct the git server. When I use TortoiseGit-1.8.1.0-32bit to handle the operation, everything is fine! But if i use the git clone command or git bash, the git clone process speed is so slow. I've attached two images showing the relative git clone transfer speeds below. Can anybody give me some suggestions? 回答1: Maybe you can fetch only the latest revision first and then fetch the rest: $ git clone --depth=1 git@github.com:joe/hello-world.git $ cd hello-world $

Git clone from bash script

依然范特西╮ 提交于 2020-04-07 18:50:30
问题 I am trying to automate my interactions with Git building a script and I am having the following problem. This works from the command line: git clone git@github.xxxx.com:blablabla/reponame.git /Users/myname/dev/myfolder And now I would like to do the same, but from my script. I have the following: #/bin/bash repository="git@github.xxxx.com:blablabla/reponame.git" localFolder="/Users/myname/dev/myfolder" git clone $repository" "$localFolder that gives me this error GitHub SSH access is

Git clone from bash script

人盡茶涼 提交于 2020-04-07 18:50:28
问题 I am trying to automate my interactions with Git building a script and I am having the following problem. This works from the command line: git clone git@github.xxxx.com:blablabla/reponame.git /Users/myname/dev/myfolder And now I would like to do the same, but from my script. I have the following: #/bin/bash repository="git@github.xxxx.com:blablabla/reponame.git" localFolder="/Users/myname/dev/myfolder" git clone $repository" "$localFolder that gives me this error GitHub SSH access is

Is there a way to determine if my local clone is a fork of some github repo?

こ雲淡風輕ζ 提交于 2020-02-22 14:43:11
问题 More specifically, how do I tell if the origin of the repo on disk is a fork of some repo? I am thinking that it should be some API call, but I am not sure. Can I rely on "remote.upstream.url"? 回答1: You could use the GitHub API for Repositories to get a specific repo GET /repos/:owner/:repo (you can use a curl call from command line) The JSON answer will include a " fork " field: value true or false. 来源: https://stackoverflow.com/questions/58595716/is-there-a-way-to-determine-if-my-local

Git clone verbose output?

人盡茶涼 提交于 2020-02-19 07:19:27
问题 I have to clone a couple of big repos in my Dockerfile. It really can take an hour to clone a single repo and I want to see standard Git progress output to understand what's going on. However, when Git is started from the Dockerfile, I see no git clone output whatsoever. The only thing printed to console is: Cloning into '/root/lib/opencv'... POST git-upload-pack (gzip 2052 to 1062 bytes) and then just a silence. While, usually, I expect something like this: Cloning into 'opencv'... POST git

Getting Access Denied while cloning using git clone command

℡╲_俬逩灬. 提交于 2020-02-02 13:13:27
问题 I am getting the below error while cloning my repository: please suggest Gurudas@Gurudas MINGW64 /e/Python/Python Programs (master) $ git clone https://github.com/Anu1996rag/Python_Basics.git Cloning into 'Python_Basics'... fatal: unable to access 'https://github.com/Anu1996rag/Python_Basics.git/': getaddrinfo() thread failed to start 回答1: MINGW64 means a git bash session on Windows. Check your git config http.proxy output as well as your echo $HTTP_PROXY output, to check if you have any