git-reference | Online Git Reference at http | Learning library

 by   git HTML Version: Current License: Non-SPDX

kandi X-RAY | git-reference Summary

kandi X-RAY | git-reference Summary

git-reference is a HTML library typically used in Tutorial, Learning applications. git-reference has no bugs, it has no vulnerabilities and it has medium support. However git-reference has a Non-SPDX License. You can download it from GitHub.

Quick reference guide of basic Git commands along with examples of common uses and options. Each section includes tasks related to the type of operation you may be trying to do. If you would like to know more about a command listed, each command links to both the official manual page and its relevant chapter in the Pro Git book.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              git-reference has a medium active ecosystem.
              It has 898 star(s) with 350 fork(s). There are 67 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 5 open issues and 38 have been closed. On average issues are closed in 386 days. There are 5 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of git-reference is current.

            kandi-Quality Quality

              git-reference has 0 bugs and 0 code smells.

            kandi-Security Security

              git-reference has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              git-reference code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              git-reference has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              git-reference releases are not available. You will need to build from source code and install.
              It has 6343 lines of code, 0 functions and 27 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of git-reference
            Get all kandi verified functions for this library.

            git-reference Key Features

            No Key Features are available at this moment for git-reference.

            git-reference Examples and Code Snippets

            No Code Snippets are available at this moment for git-reference.

            Community Discussions

            QUESTION

            Git: fetch pull requests from GitHub
            Asked 2021-Nov-28 at 19:57

            As far as I understand, GitHub/Lab uses Git custom references / internals to store Pull Requests in repository.

            How can I fetch all the pull requests in my cloned repository?

            ...

            ANSWER

            Answered 2021-Nov-28 at 19:57

            You need to check which namespace is used for those requests:

            • GitHub: refs/pull/
            • GitLab: refs/merge-requests/
            • BitBucket: refs/pull-requests/

            Then, as illustrated in this gist, you can configure your remote refspecs:

            Source https://stackoverflow.com/questions/70141055

            QUESTION

            Does using reference repos makes sense for pull request checkers?
            Asked 2021-Oct-04 at 19:55

            One of the ways to shorten Jenkins job execution time is to use reference repo during clone.

            The job then relies on reference repo, a local mirror (cache) of the remote repo that is updated frequently (e.g., by another job).

            What happens if I run pull request checker using reference repo and the newest commit has not been cached yet? Will Jenkins fetch missing commits?

            ...

            ANSWER

            Answered 2021-Oct-04 at 19:55

            What happens if I run pull request checker using reference repo and the newest commit has not been cached yet? Will Jenkins fetch missing commits?

            Yes. The point of a reference repository is to act as a fast lookaside cache.

            Optional reading: how this works

            In the following, "your Git" refers to your Git software operating on your machine creating your new clone for Jenkins, "their Git" refers to the Git software operating on the machine on which the repository being cloned is hosted, and "reference Git" refers to the repository on the Jenkins machine (it must be on the same machine).

            Remember also that a hash ID—whether it's a commit hash ID, or any other internal object hash ID—is meant to be unique to that particular data. That is, the hash ID of every commit in every repository is different from that of every commit in every other repository, since each commit is itself unique. The one exception to this rule about uniqueness of commit hash IDs is if this is literally the same commit: if repository A has commit a123456..., and repository B obtains that commit from repository A, repository B now calls that commit a123456... as well. If repository C obtains that particular commit—from A or B—repository C calls it a123456... too, and so on.

            So: your Git calls up their Git. Their Git lists out some branch and tag and other such names. Each name corresponds to one (1) hash ID.

            Your Git now picks and chooses over those names: which ones does your Git want? Depending on whether your clone is --single-branch, it will want all of them, or just one of them. It picks out which one(s) it wants, putting those hash IDs into a pool of hash IDs.

            Without a reference clone, your Git now sends their Git all of those hash IDs with a "want" message. Their Git adds those hash IDs to a wanted list and looks up those objects. If those objects are commit objects—usually they are, but some of them might be tag objects if you're fetching tags—their Git must now offer the parent commit hash IDs to your Git. (If they're tag objects, their Git must offer the commit hash IDs.) Your Git adds these to its pool of wanted IDs and sends those with "want" messages as well. They then list the parents of those, and your Git "wants" those, and so on.

            Using --depth adjusts this process a bit: the two Gits agree that at some depth of this sort of traversal, the two will say "that's enough parent following" and they'll stop the whole offer/want thing. Without --depth, the two Git go on enumerating commits until they've offered, and your Git has "want"ed, every commit.

            Their Git now has no more commits to offer, so they begin packaging the to-be-sent commits up, along with all the supporting objects required for those commits. (If you're doing this as a live clone, this is where you see the "counting" "compressing" messages.) They send your Git this package, which your Git opens and unpacks and stores in your clone, and now you have a clone.

            Later, your Git can call up their Git again, using git fetch. Their Git will once again list their names and hash IDs. Your Git will check to see which of those commits you already have, and for those commits, tell their Git: No thanks, I already have that one. For commits you don't have, your Git will tell their Git that you want them, and then they'll offer the commit's parents, exactly as before. This conversation continues until your Git and their Git have agreed as to which commits you already have, vs which commits you need. Their Git now counts and compresses and so on—and, because you already have commits and their supporting objects, their Git can avoid sending you anything in those commits. So the package fetched with a git fetch after the first git clone is much smaller and easier to deliver.

            When you clone with --reference, the same procedures apply. However, this time, as their Git lists out commit hash IDs, your Git checks two places:

            • Do I already have this commit? (For an initial clone the answer is always "no" but for subsequent git fetch operations, it's often "yes").
            • Does my reference clone have this commit?

            If either one has the commit, your Git says no thanks, I have that one already. If not, your Git says it wants that one, and their Git is now obligated to offer that commit's parent commit(s).

            Since commit hash IDs are globally unique, your Git only has any of these commits if it is literally the same commit as the other Git's commit. Whether it's in your own repository, or your reference repository, it is the same commit.

            The end result of this cloning or fetching process is the same as the end result of a clone without --reference: your Git now has all the commits that they offered, that your Git needed and therefore took. The difference is that when they offer some commit hash ID, such as a123456..., your Git looks in two places: its own repository database, and the reference repository's database.

            The --dissociate option

            There is one other optional difference. When your Git looks in the two databases and finds that the commit they're offering is in the reference database, your Git can either:

            • leave it there, on the assumption that it will continue to be there in the future, or
            • copy it into its own private database, on the assumption that the reference copy might vanish

            The default is to leave it in the reference copy: there's no need to fatten things up with another copy when both sets of database file are on the same host machine. But if you plan to remove or otherwise clean out the reference copy in the future, you may wish to force your git clone --reference operation to make copies at this time. To do that, use the --dissociate option.

            Note that this option, like --reference, is only available during the initial clone, not during git fetch. If you:

            • make a clone with --reference but not --dissociate;
            • then update that clone with git fetch, perhaps over the course of many days or months

            some of the internal objects in that clone are still really just stored in the reference clone, but only those that did come from the reference initially, during the initial clone, are still coming from the reference clone. There is no git fetch option to stop using the reference clone here. If you want or need to destroy the reference clone, see below.

            "Undoing" a reference clone

            Because --dissociate is only available during git clone, to "undo" a reference clone—which then allows you to destroy the original reference—you must now "clone the clone". That is, you will run git clone with the source repository being your clone that uses the reference. Add the --dissociate flag here, so that your new clone of your existing clone-that-depends-on-a-reference-clone makes a full copy. Otherwise your clone-of-existing-clone will just use references to the reference clone.

            You most likely want to make this clone-of-a-clone using --mirror, so the "undo reference" operation is actually:

            Source https://stackoverflow.com/questions/69433464

            QUESTION

            Why changes a new branch in detached head state all the parent refs?
            Asked 2020-Jul-13 at 08:04

            If I compare the git/refs when creating a new branch from last commit of a branch versus creating from a detached head state, the git/refs shows different behavior (names) and I like to understand why.

            Lets assume the head is on master.

            I need a new dev branch. After that, I made some commits to the new branch and some fixes on master.

            Now I see another way how to solve the dev branch and I made a second new branch and some commits on that and on master again some fixes.

            But now the refs look different! As long as I don't merge plus delete or only delete the second branch still the first two refs called after that second branch.

            Why is this a good behavior, cause I cannot easily see that the first refs usually belong to master? Only hashes and parent hashes help with identification, but are a slow method. THX.

            EDIT: The information shown here is provided from git log command.

            ...

            ANSWER

            Answered 2020-Jul-13 at 08:04

            Unlike other version control systems you may be familiar with, commits don't belong to any branch. Instead, a branch is just a label that points to a commit. There's no definitive answer to the question "which branch does a commit belong to" or "which branch was a commit written on". Instead, you can only say what commits are reachable by a branch. And that's just what %S does. It works just like --source.

            Source https://stackoverflow.com/questions/62862197

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install git-reference

            You can download it from GitHub.

            Support

            If you would like to contribute, simply fork the repository, push your changes to a branch and send a pull request. Typo fixes, improvements to grammar or readability, it's all welcome.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/git/git-reference.git

          • CLI

            gh repo clone git/git-reference

          • sshUrl

            git@github.com:git/git-reference.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link