# Where are saved git-commited packages?

**URL:** <https://discourse.julialang.org/t/where-are-saved-git-commited-packages/123527>\
**Category:** General Usage\
**Created:** [December 6, 2024, 9:37am UTC](https://discourse.julialang.org/t/where-are-saved-git-commited-packages/123527 "2024-12-06T09:37:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [December 6, 2024, 9:37am UTC](https://discourse.julialang.org/t/where-are-saved-git-commited-packages/123527/1 "2024-12-06T09:37:28Z")

</div>

When I run:

`Pkg.add(url="git@github.com:sylvaticus/DICE.jl.git", rev="master")`

(without Pkg.dev)

where the source code of the package is saved ?

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [December 6, 2024, 10:08am UTC](https://discourse.julialang.org/t/where-are-saved-git-commited-packages/123527/2 "2024-12-06T10:08:52Z")

</div>

Let’s try it out, with a simpler package.

```julia
$ mkdir /tmp/testdepot
$ JULIA_DEPOT_PATH=/tmp/testdepot julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.10.7 (2024-11-26)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(@v1.10) pkg> add Example#master
  Installing known registries into `/tmp/testdepot`
       Added `General` registry to /tmp/testdepot/registries
       Added `CVRegistry` registry to /tmp/testdepot/registries
     Cloning git-repo `https://github.com/JuliaLang/Example.jl.git`
    Updating git-repo `https://github.com/JuliaLang/Example.jl.git`
    Updating registry at `/tmp/testdepot/registries/CVRegistry.toml`
    Updating registry at `/tmp/testdepot/registries/General.toml`
   Resolving package versions...
    Updating `/tmp/testdepot/environments/v1.10/Project.toml`
  [7876af07] + Example v0.5.5 `https://github.com/JuliaLang/Example.jl.git#master`
    Updating `/tmp/testdepot/environments/v1.10/Manifest.toml`
  [7876af07] + Example v0.5.5 `https://github.com/JuliaLang/Example.jl.git#master`
Precompiling project...
  1 dependency successfully precompiled in 1 seconds

(@v1.10) pkg> 

$ tree -d -L 3 /tmp/testdepot/
/tmp/testdepot/
├── clones
│ └── 4643033083726148914
│ ├── hooks
│ ├── info
│ ├── objects
│ └── refs
├── compiled
│ └── v1.10
│ └── Example
├── environments
│ └── v1.10
├── logs
├── packages
│ └── Example
│ └── A1z7K
├── registries
└── scratchspaces
    └── 44cfe95a-1eb2-52ea-b672-e2afdf69b78f

```

It’s maybe not completely obvious but I interpret this to be that we have a clone of the Example repository in `clones` and a snapshot of the master branch in `packages`. When you don’t set `JULIA_DEPOT_PATH` those would be inside your `.julia` directory.

The subdirectory name `A1z7K` is computed from some information that I don’t remember in detail but you can find it for the loaded version of the package with `pathof`. I have never looked into the naming of the subdirectories of `clones`.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [December 6, 2024, 2:22pm UTC](https://discourse.julialang.org/t/where-are-saved-git-commited-packages/123527/3 "2024-12-06T14:22:02Z")

</div>

> [@GunnarFarneback](#):
>
> The subdirectory name `A1z7K` is computed from some information that I don’t remember in detail

It is a [CRC32 hash of the uuid and the tree sha1 hash](https://github.com/JuliaLang/julia/blob/fe2617378cb6ea56a1b5e41ff33b7ad34bfa71ac/base/loading.jl#L202-L206).
