Yet Another Git Gist is a no-database public git-gist.
It's an user-friendly web-app designed primarily to keep a record of text snippets using light-weight git. Gists can be created and shared locally (for e.g. in an organization). The changes can be tracked easily. One can also view the list of gists and edit, delete, download, remove etc. as required.
-
Install cmake from brew or apt-get package manager. To build from source, follow this link
-
Install libgit2 as follows :
$ wget https://github.com/libgit2/libgit2/archive/v0.23.4.tar.gz $ tar xzf v0.23.4.tar.gz $ cd libgit2-0.23.4/ $ cmake . $ make $ sudo make install
-
Install go packages as folloes :
$ go get github.com/libgit2/git2go
-
Build the project using :
$ go build
-
Troubleshooting:-
ImportError: libgit2.so.0: cannot open shared object file: No such file or directory
This happens for instance in Ubuntu, the libgit2 library is installed within the /usr/local/lib directory, but the linker does not look for it there. To fix this call$ sudo ldconfig
yagg [-b] [-h] [-p] [-r]
-h
Used for getting the usage of the flags.
-r path/to/save/repo
Used to set the repository path where the git-gist repository will be saved. If nothing is specified, data folder in the present working directory will be set as the default path.
-p port-number
Used to specify the port used by YAGG. Port 8080 will be used by default.
-b host-name
Used to set the hostname for the server. If nothing is specified, 0.0.0.0 will be used as the host.
-
Run the server at 0.0.0.0:8080 using command :
$ yagg -b 0.0.0.0 -p 8080
-
Let's create our first gist
main.go
http://0.0.0.0:8080/
-
View
http://0.0.0.0:8080/show/gist-name
http://0.0.0.0:8080/show-by-id/gist-name/commit-id
-
Edit
http://0.0.0.0:8080/edit/gist-name
-
Track the changes
http://0.0.0.0:8080/history/gist-name
-
Generate raw file
-
wget
http://0.0.0.0:8080/raw/gist-name
-
wget
http://0.0.0.0:8080/raw-by-id/gist-name/commit-id
-
-
Download
-
http://0.0.0.0:8080/download/gist-name
-
http://0.0.0.0:8080/download-by-id/gist-name/commit-id
-
Delete
-
http://0.0.0.0:8080/remove/gist-name
-
View all:
-
http://0.0.0.0:8080/list
- Sorting gists in the list page based on options like last updated, etc. Currently gists are sorted in the order of gist-name
- Search field to be included
- Option of uploading a file as a gist
- Creating user-specific gists
- User Interface to be enhanced