Skip to content

onerbs/vit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vit

Another Git wrapper

Installation

This module depends on uwu

Clone this repository in your V modules folder:

git clone https://github.com/onerbs/vit ~/.vmodules/vit

Usage

Initialize a new repository, commit and push.

import vit.repo
import vit.uri

fn main() {
	mut repo := repo.init() ?           // `git init`

	repo.stage('LICENSE') ?             // `git add LICENSE`
	repo.commit('Add LICENSE') ?        // `git commit -m "Add LICENSE"`

	host := uri.github('sample')        // See the available hosts on `uri/hosts.v`
	url := host.ssh()                   // "git@github.com:user/sample.git"

	                                    // `git remote add origin git@github.com:user/sample.git`
	origin := repo.add_remote('origin', url) ?

	origin.push_upstream() ?            // `git push -u origin main`
}

About

[WIP] Another Git wrapper

Topics

Resources

License

Stars

Watchers

Forks

Languages