2016年1月14日木曜日

[mercurial] 入門mercurialからのメモ

概要

git同様、分散型リポジトリ

操作

初期化

% hg init
% hg init work

登録

% hg add index.html

コミット

% hg commit

履歴参照

% hg log

取得

% hg update 3
まとめて取り出す
% hg archive -r 3 /tmp/mywork.%h

タグ

タグ追加

% hg tag -r

不要ファイルの削除

登録の必要がないファイルを削除する。

% hg remove

変更の取り消し

hg commit以外の取り消しはrevirtで行う。revirt自体の取り消しは行えない。

% hg revirt

hg commitの取り消しはrollbackで行う

ファイル名付け直し


copyで名前変更

% hg copy
全体の複製
%hg clone

外部との連携


pullは自リポジトリへの反映、pushは外部に反映

%hg pull
%hg push

マージ

複数のバージョンをマージ。

% hg merge

マージの状況を表示

% hg resolve -l

テキストベースでの成果送付


% hg export -o

バイナリベースでの成果送付


% hg bundle
% hg unbundle







0 件のコメント:

コメントを投稿