Go Git

go-git - Grep

3 minute read Published:

go-git now supports git-grep. Follow the “go-git” tag to read other go-git related posts. git-grep The Amazing Worktree Grep Options Option Validation Grep Result git-grep git-grep - Print lines matching a pattern git-scm.com git-grep performs pattern matching in the tracked files in the work tree, blobs registered in the index files, or blobs in given tree objects. The result of match is sent to stdout, which consists of filename and content of the line.

go-git - Clean

2 minute read Published:

go-git now supports git-clean. Follow the “go-git” tag to read other go-git related posts. Git provides a way to clean the working tree by deleting any untracked files with the git clean command. By default, git clean would delete any untracked files. Untracked (empty) directories are not deleted. To delete them, -d option can be passed. Since clean can be harmful if not used carefully, git wouldn’t just delete the files.

go-git - Object Alternates

2 minute read Published:

This is another git related post coming out of more contributions to the src-d/go-git project. Other related post can be found by following the “go-git” tag at the bottom of this page. Git clone offers an option to clone a repo without actually copying the git objects to a new location, but sharing the objects with the new repo. This can be done by using the --shared or -s option. It’s for local repos only.

go-git - Tag Signature Verification

3 minute read Published:

This post is also a sequel of other posts related to git and signature verification (Git Commit Signature Verification and Git Commit Timestamp). This one is based on adding tag signature verification in src-d/go-git. Verify by taking everything apart Verify using src-d/go-git Git tags are signed similar to commits with small differences in their storage format. Like commit, which are stored in .git/objects/, tag are stored in .

go-git - Commit Timestamp

2 minute read Published:

This is related to the previous post, Git Commit Signature Verification. That post was based on the work of implementing git commit signature verification in src-d/go-git. This post is a sequel to that in a way. The previous post ended with an example of how to create a custom commit and run verification on it. ts := time.Unix(0000000000, 0) commit := &Commit{ Hash: plumbing.NewHash("8a9cea36fe052711fbc42b86e1f99a4fa0065deb"), Author: Signature{Name: "darkowlzz", Email: "example@darkowlzz.space", When: ts}, Committer: Signature{Name: "darkowlzz", Email: "example@darkowlzz.

go-git - Commit Signature Verification

6 minute read Published:

This post is about PGP signature verification of git commits. Verify by taking things apart Verify using git cli Verify using golang’s crypto/openpgp package Verify using src-d/go-git Git commits and any kind of data can be signed using GPG (GNU Privacy Guard) program, available at https://www.gnupg.org/. It implements the OpenPGP standard for encryption. 4 Things Data This is the data/content that is to be communicated or published and requires signing for verifiable authenticity.