Tag, leaving the user in a detached head: git clone -single-branch -branch v2.12.0 & Which of course was also subtly buggy if -branch was pointed at a TagOpt=-no-tags right after cloning & deleting any existing tags: git clone -single-branch & single-branch would have retrieved, or alternatively by setting Which requires hardcoding the " master" name, which may not be the main Manually tweaking the config in a fresh repository: git init git &įetch = +refs/heads/master:refs/remotes/origin/master Without this change the only way of accomplishing this was either by The user might want to avoid all of that overhead to simply use a repository like that to browse the "master" branch, or something like a CI tool might want to keep that one branch up-to-date without caring about any other references. " git log " with the bash completion will slowly show ~40k references instead of 1. creating ~40k tags in linux.git will cause a command like git log -1 >/dev/null to run in over a second instead of in a matter of milliseconds, in addition numerous other things will slow down, e.g. Many git commands pay some fixed overhead as a function of the number of references. This option works without -single-branch as well, and will do a Tags, and which only tracks a single upstream branch. Now -no-tags can be added -single-branch to clone a repository without When supplying -single-branch the primary remote branch will be cloned, but in addition tags will be followed & retrieved. Without this change there's no easy way to clone a repository without (Merged by Junio C Hamano - gitster - in commit a1fdc85, ) clone: add a -no-tags option to clone without tagsĪdd a -no-tags option to clone without fetching any tags. See commit 1524ccd, commit 0dab246, commit 28d67d9 () by Ævar Arnfjörð Bjarmason ( avar). name : Git checkout : repo : '' dest : /srv/checkout version : release-0.22 - name : Read-write git checkout from github : repo : :mylogin/hello.git dest : /home/mylogin/hello - name : Just ensuring the repo checkout exists : repo : '' dest : /srv/checkout update : no - name : Just get information about the repository whether or not it has already been cloned locally : repo : '' dest : /srv/checkout clone : no update : no - name : Checkout a github repo and use refspec to fetch all pull requests : repo : dest : /src/ansible-examples refspec : '+refs/pull/*:refs/heads/*' - name : Create git archive from repo : repo : dest : /src/ansible-examples archive : /tmp/ansible-examples.zip - name : Clone a repo with separate git directory : repo : dest : /src/ansible-examples separate_git_dir : /src/ansible-examples.git - name : Example clone of a single branch : repo : dest : /src/ansible-examples single_branch : yes version : master - name : Avoid hanging when http(s) password is missing : repo : dest : /src/from-private-repo environment : GIT_TERMINAL_PROMPT : 0 # reports "terminal prompts disabled" on missing password # or GIT_ASKPASS: /bin/true # for git before version 2.3.With Git 2.13.x/2.14 (Q2 2017), this will be possible (ie: clone without tags) Controlling how Ansible behaves: precedence rules.Collections in the Theforeman Namespace.Collections in the Telekom_mms Namespace.Collections in the T_systems_mms Namespace.Collections in the Servicenow Namespace.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |