Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acusti/git-json
https://github.com/acusti/git-json
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/acusti/git-json
- Owner: acusti
- Created: 2016-01-05T00:55:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-05T00:56:02.000Z (almost 9 years ago)
- Last Synced: 2024-05-21T01:36:27.533Z (6 months ago)
- Language: JavaScript
- Size: 50.8 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/rook2pawn/git-json.svg?branch=master)](https://travis-ci.org/rook2pawn/git-json)
git-json
========var gitjson = require('git-json')
var git = gitjson()git.pipe(process.stdout)
git.init()
git.save('mydocument',{foo:'bar',val:2})
git.add('mydocument')
git.commit('first commit')
git.log()your new working and staging functions
======================================
This chart summarizes the functions you will use in working vs staging.| | Working | Staging |
|------|---------|---------|
|![save](http://i.imgur.com/osgHYPP.png) | **.save** | **.add** |
|![trash](http://i.imgur.com/CZO14tR.png)| **.delete** | **.remove** |.log()
======Produces a git log similar to git log --all --decorate
![Git-json Log Image](http://i.imgur.com/dQGB61Y.png)
.save(name,content)
===================Save content under "file" name into the working directory
.add(name)
==========Places "file" name into the staging index.
.delete(name)
=============Delete content under "file" name from the working directory
.remove(name)
=============Issues a Remove "file" name order into the staging index
.commit(message)
================Peforms a commit with message
.branch(branchname)
===================Create a branch with branchname
.checkout(branchname)
=====================Returns the contents at the tip of branchname
.merge(branchname)
==================Peforms a fast forward merge, as well as non-ff conflictless merge. non-ff conflict merge soon.
.ancestor(branchname)
=====================Returns true if current branch tip is upstream of branchname (i.e. "is branchname behind us"?)
.rebase(branchname)
===================Rebases current branch onto branchname.
---
## Other useful functions ###
##### .config(obj)
Sets the git configuration. Typical use is
git.config({user:{email:'[email protected]',name:'Joe Bar'}})
##### .branch()
Returns the list of all branches and indicates which branch you are on.
##### .visual()
Show a tree-based visual representation of the repository
Contributions
=============Please contribute, as I actively monitor discussions and pull requests. Note the TODO list
TODO
====![Pencil Todo](http://i.imgur.com/7cCiqun.png) git remove
![Pencil Todo](http://i.imgur.com/7cCiqun.png) NonFF merge with conflicts / rebase with conflicts
![Pencil Todo](http://i.imgur.com/7cCiqun.png) garbage collection
![Pencil Todo](http://i.imgur.com/7cCiqun.png) multiple parents preservation on mergeRecently added
==============* NonFF merge without conflicts
* git rebase without conflicts
* treelib with commit hashes for visualizationsThanks
======\#git on freenode.
trash icon provided by http://www.aspneticons.com/
Disk icon provided by http://www.aha-soft.comCopyright (C) 2016 David Wee
License MIT