From 6d084ffbf2d5319bab574fcd5de6a0d50761eb20 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Mon, 8 Jul 2013 19:41:12 +0400 Subject: [PATCH] Add: git rebase -i ->| split. Closes #245. --- git-tutorial.lyx | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/git-tutorial.lyx b/git-tutorial.lyx index f22155b..b72e7ad 100644 --- a/git-tutorial.lyx +++ b/git-tutorial.lyx @@ -1652,6 +1652,51 @@ git rebase -i -p HEAD~5 # которые хотим объединить, сохранить. \end_layout +\begin_layout Standard +Разбить произвольный коммит на два последовательных коммита можно следующими + командами: +\end_layout + +\begin_layout LyX-Code +git rebase -i ^ branch_name +\end_layout + +\begin_layout LyX-Code +git rebase HEAD^ +\end_layout + +\begin_layout LyX-Code +git add -p # add changes for the 1th commit +\end_layout + +\begin_layout LyX-Code +git commit -m +\begin_inset Quotes eld +\end_inset + +1st commit +\begin_inset Quotes erd +\end_inset + + # make 1st commit +\end_layout + +\begin_layout LyX-Code +git commit -am +\begin_inset Quotes eld +\end_inset + +2nd commit +\begin_inset Quotes erd +\end_inset + + # make 2nd commit +\end_layout + +\begin_layout LyX-Code +git rebase --continue # complete rebase operation +\end_layout + \begin_layout Subsubsection Выделение поддиректории в отдельный репозиторий \end_layout