Composer: use specific commit of your own fork of a third party library

With following way I can use forked repo (sampleRepo) with no problem.

   "require": {
        "some-one-else/sampleRepo": "dev-master"

  "repositories": [{
            "type": "vcs",
            "url": ""

I have changed few things on forked repo and released more than one version.

My question is how can I load specific commit or version from updated fork?

I need to load release v1.0


commit reference (db11221) from forked repo.

  • Git: Ignore only content of the folder
  • Confused about git rebase
  • Report of bitbucket and github pull and push
  • Github for Windows puts repo in “rebasing” state, but says “failed to sync this branch”
  • Github for Windows installing got error “Unable to retrieve application files, Files corrupt in deployment”
  • Simple “Get all new commits from SVN and put them into a true GIT, to 'svn' branch” setup?
  • git tree (still) contains duplicates and an erroneous signal 13
  • Github for Windows gui + Eclipse
  • One Solution collect form web for “Composer: use specific commit of your own fork of a third party library”

    From the doc:

    require and require-dev additionally support explicit references
    (i.e. commit) for dev versions to make sure they are locked to a given
    state, even when you run update. These only work if you explicitly
    require a dev version and append the reference with #<ref>.

    So simply try:

       "require": {
            "some-one-else/sampleRepo": "dev-master#db11221"
      "repositories": [{
                "type": "vcs",
                "url": ""

    Take a look at this note also:

    Note: This feature has severe technical limitations, as the
    composer.json metadata will still be read from the branch name you
    specify before the hash. You should therefore only use this as a
    temporary solution during development to remediate transient issues,
    until you can switch to tagged releases. The Composer team does not
    actively support this feature and will not accept bug reports related
    to it.

    Git Baby is a git and github fan, let's start git clone.