git-helper
v0.0.4
Published
git操作辅助工具
Downloads
7
Readme
git操作辅助工具
使用案例
let GitHelper = appUtils.requireCommon('GitHelper');
let remotePath = '[email protected]';
let localPath = 'D:/aaaccccbbbbb';
route.get('/git', async(ctx, next) => {
let gitHelper = GitHelper.create(localPath);
await gitHelper.clone(remotePath, localPath, 'dev');
ctx.body = global.JSONResponse(1, 11, 'clone成功');
});
route.get('/git/reset', async(ctx, next) => {
let gitHelper = GitHelper.create(localPath);
await gitHelper.reset('dev');
ctx.body = global.JSONResponse(1, 11, '重置为dev分支');
});