#topicpath /////////////////////////////////////////////////////////////////////////////// * 目次 [#o9fa6d61] #contents(); /////////////////////////////////////////////////////////////////////////////// * magit [#ycbd3850] - emacs 上で動作する、[[git>VersionCtl/Git]] フロントエンド //============================================================================= ** 導入方法 [#installing] - Linux の場合、ディストリビューションによっては用意されている場合もある -- debian の場合、 magit パッケージを aptitude install すると、即使えるようになる。 - リポジトリ: https://github.com/magit/magit.git - 最近のバージョンでは dash.el を必要とする。導入済みでない場合は用意しておく必要がある。 -- dash.el のリポジトリ: https://github.com/magnars/dash.el - 手動インストールした場合の設定例。magit と dash に load-path も通す必要がある。 ; magit (setq load-path (cons (expand-file-name "~/.emacs.d/site-lisp/magit") load-path)) (setq load-path (cons (expand-file-name "~/.emacs.d/site-lisp/dash") load-path)) (load-library "~/.emacs.d/site-lisp/dash/dash.el") (load-library "~/.emacs.d/site-lisp/magit/magit.el") /////////////////////////////////////////////////////////////////////////////// * コマンド [#o7c058aa] |~binding |~command |~remark | |M-x: magit-status | magit-mode 起動 | | | s |選択中のファイルを stage に追加(commitの対象に)する | | | S |前ファイルを stage に追加する | | | u |ファイルを stage から降ろす | | | U |全ファイルを stage から降ろす | | | c |commit log を書く | | | C-c C-c |commit する | | | C-c C-a |commit をやり直す |git commit --amend | | P |commit した変更を push する | | | l |log を表示する | l-l でshort log, l-L で verbose な log を表示する | | z |stash を作成する | | | a |stash を適用(apply)する | | | A |stash を pop する | | | k |stash を drop(最新の stash 1つを削除)する | | | b |ブランチを切り替える(git checkout) | | | f f | git fetch (Current) | | | f o | git fetch (commit) | | | f a | git fetch (all remotes) | | | F |pull | | | M-x: magit-reflog |reflog |そのリポジトリ上で行った git の操作履歴を表示する | | d |diff |ローカルの編集差分の表示 | | t |tag を作成する | | | T |~|~| /////////////////////////////////////////////////////////////////////////////// * link [#y086fb37] - [[magit.el を試してみた>http://gom.hatenablog.com/entry/20090524/1243170341]] - [[[git][emacs] magitメモ>http://w.koshigoe.jp/study/?%5Bgit%5D%5Bemacs%5D+magit%A5%E1%A5%E2]] - [[Magitユーザーマニュアル>https://docs.google.com/document/d/1v1lw539dpN3EVksU-CAjD-4vFeb_w3Ez3Y2RfVlE2F8/edit]]