Skip to content

Instantly share code, notes, and snippets.

View aywan's full-sized avatar
🙃

Ivan Bragin aywan

🙃
  • Moscow
View GitHub Profile
@aywan
aywan / !Window Logs in Golang.md
Created July 27, 2023 14:52 — forked from will7200/!Window Logs in Golang.md
Read Windows Logs in Golang

Read window logs in Golang

@aywan
aywan / git2go-merge-local-branch.go
Created February 6, 2018 15:40 — forked from danielfbm/git2go-merge-local-branch.go
how to merge two local branches using git2go
package main
import (
"errors"
"log"
"github.com/libgit2/git2go"
)
func mergeBranches(repo *git.Repository, sourceBranchName string, destinationBranchName string) error {
// Assuming that these two branches are local already
sourceBranch, err := repo.LookupBranch(sourceBranchName, git.BranchLocal)
@aywan
aywan / git2go-checkout-branch.go
Created February 6, 2018 15:40 — forked from danielfbm/git2go-checkout-branch.go
How to do a git checkout branch using git2go
package main
import (
"errors"
"log"
"github.com/libgit2/git2go"
)
func checkoutBranch(repo *git.Repository, branchName string) error {
checkoutOpts := &git.CheckoutOpts{