# New Git IPFS Remote

**URL:** https://discuss.ipfs.tech/t/new-git-ipfs-remote/7702
**Category:** News
**Created:** [April 11, 2020, 3:22pm UTC](https://discuss.ipfs.tech/t/new-git-ipfs-remote/7702 "2020-04-11T15:22:31Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![dysbulic](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/dysbulic/32/3884_2.png) [@dysbulic](https://discuss.ipfs.tech/u/dysbulic)
#### Post date: [April 11, 2020, 3:22pm UTC](https://discuss.ipfs.tech/t/new-git-ipfs-remote/7702/1 "2020-04-11T15:22:32Z")

</div>

I’m working on a [git remote](https://github.com/dhappy/git-remote-ipfs) that makes the stored repository accessible.

This version does not attempt to store the raw git blocks. As well as avoiding the [block sharding problem](https://discuss.ipfs.io/t/git-on-ipfs-links-and-references/730/17) that causes, this makes the content accessible.

When the repo is created, the root of the filesystem contains the branch that was pushed. The git info is stored in `.git/` ([structure](https://github.com/dhappy/git-remote-ipfs#generated-file-structure)).

I just created a [simple example repo](https://ipfs.io/ipfs/QmZzP8MCJyfvUr2Eqk6kfotacVWeGxXmHEhoyGAos1fbiD). Since it contains an `index.html`, that is displayed. To view the commits, see [`.git/vfs/commits/`](https://ipfs.io/ipfs/QmZzP8MCJyfvUr2Eqk6kfotacVWeGxXmHEhoyGAos1fbiD/.git/vfs/commits/).

[With the remote installed](https://github.com/dhappy/git-remote-ipfs#installation), the root hash is an acceptable argument to `git clone ipfs://*hash*`.

---

<div class="post-metadata">

### Author: ![dysbulic](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/dysbulic/32/3884_2.png) [@dysbulic](https://discuss.ipfs.tech/u/dysbulic)
#### Post date: [April 13, 2020, 7:17am UTC](https://discuss.ipfs.tech/t/new-git-ipfs-remote/7702/2 "2020-04-13T07:17:40Z")

</div>

I worked with it a bit more and added IPNS support. The following now work:

- `ipfs key gen --type=rsa --size=2048 mysite`
- `git remote add ipns ipns::key:mysite`
- `git push ipns`
- `git clone ipns://git-remote-ipfs.dhappy.org`

---

<div class="post-metadata">

### Author: ![craigmayhew](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/craigmayhew/32/3708_2.png) [@craigmayhew](https://discuss.ipfs.tech/u/craigmayhew)
#### Post date: [April 21, 2020, 6:08pm UTC](https://discuss.ipfs.tech/t/new-git-ipfs-remote/7702/3 "2020-04-21T18:08:15Z")

</div>

@dysbulic I’ve run into some issues trying to use this. Would it be possible for you to enable issue tracking on the github project and I can create an issue there?

I’d very much like to contribute to this going forward.

---

<div class="post-metadata">

### Author: ![dysbulic](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/dysbulic/32/3884_2.png) [@dysbulic](https://discuss.ipfs.tech/u/dysbulic)
#### Post date: [April 22, 2020, 12:12am UTC](https://discuss.ipfs.tech/t/new-git-ipfs-remote/7702/4 "2020-04-22T00:12:55Z")

</div>

@craigmayhew, [issues are now enabled.](https://github.com/dhappy/git-remote-ipfs/issues) I look forward to your feedback.

---

<div class="post-metadata">

### Author: ![Ericson2314](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ericson2314/32/3846_2.png) [@Ericson2314](https://discuss.ipfs.tech/u/Ericson2314)
#### Post date: [June 1, 2020, 3:17pm UTC](https://discuss.ipfs.tech/t/new-git-ipfs-remote/7702/5 "2020-06-01T15:17:46Z")

</div>

What do you mean by “raw git blocks”? Does this understand git’s own hashes with the IPLD support for git, or does it rehash the data?

---

<div class="post-metadata">

### Author: ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)
#### Post date: [June 1, 2020, 3:55pm UTC](https://discuss.ipfs.tech/t/new-git-ipfs-remote/7702/6 "2020-06-01T15:55:23Z")

</div>

“git raw blocks” are the objects in `.git/objects` (decompressed).

> Does this understand git’s own hashes with the IPLD support for git, or does it rehash the data?

It re-uses the hash but transforms it into a CID (wraps it in a SHA1 multihash, then in a CID with the GitRaw multicodec).

---

<div class="post-metadata">

### Author: ![Ericson2314](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ericson2314/32/3846_2.png) [@Ericson2314](https://discuss.ipfs.tech/u/Ericson2314)
#### Post date: [June 4, 2020, 3:34pm UTC](https://discuss.ipfs.tech/t/new-git-ipfs-remote/7702/7 "2020-06-04T15:34:21Z")

</div>

Thanks @stebalien, this works because JavaScript `ipfs` depends on `ipld` which in turn depends on `ipld-git`?
