Skip to content

Instantly share code, notes, and snippets.

@suer
suer / _nya_git.lua
Last active December 13, 2015 17:39 — forked from azu/_nya_git.lua
-- nyaosのgit向けluaコマンド
-- print('loading... "_nya_git.lua"')
-- $git submodule rm
-- サブモジュールの削除
-- http://labs.timedia.co.jp/2011/03/git-removing-a-submodule.html
nyaos.command['git submodule rm'] = function(name)
local modulepath = nyaos.eval('git config --file .gitmodules --get submodule.' .. name .. '.path');
nyaos.exec('git rm --cached ' .. modulepath);
nyaos.exec('git config --file .gitmodules --remove-section submodule.' .. name);
nyaos.exec('git commit -m "Remove submodule '..name..'"')