Skip to content

TeamMeadows/gm_git

Repository files navigation

gm_git

Basic git support for Garry's Mod

Usage

require("gm_git")

local repo, err = git.open("./garrysmod/addons/adminsystem")

if (err) then
  error("git repo open error: " .. err)
end

-- Fetches the current branch and fast-forwards it if possible, using system credentials.
local err = repo:fetch()

if (err) then
  error("unable fetch git repo: " .. err)
end

-- Returns the identifier (hash) of the current commit in the repository.
local commit = repo:get_commit_id()

print(commit) -- 337dbd2f46a4ebae44dd754e7d5113feac397ac8
-- Returns the name of the current branch the repository is on.
local branch = repo:get_branch()
print(branch) -- main

Downloads

Architecture Download
Windows x32 Download
Windows x64 Download
Linux x32 Download
Linux x64 Download

Build

Note

All possible targets can be viewed in Build workflow.

cargo build --release --target <target>

About

Add basic git support in Garry's Mod

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages