Commit 7c6b69f0 authored by  Joe  Rackham's avatar Joe Rackham
Browse files

Add rebasing section

parent 705d327c
......@@ -7,10 +7,13 @@
\@writefile{toc}{\contentsline {section}{\numberline {3}Branching \& Merging}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Creating a new branch}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Fast-Forward Merging}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}3-Way Merging}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Workflow}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Committing}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Stashing}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Tracking Changes}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Undoing Changes}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.5}Maintenance}{2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.6}Rewriting History}{2}}
\@writefile{toc}{\contentsline {section}{\numberline {5}Rebasing}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Changing the base}{3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Interactive Mode}{3}}
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex 2020.3.23) 23 MAR 2020 10:26
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex 2020.3.23) 23 MAR 2020 11:34
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
......@@ -231,26 +231,26 @@ LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 30.
{/var/lib/texmf/fonts/map/pdftex/updmap/}] [2] (./main.aux) )
{/var/lib/texmf/fonts/map/pdftex/updmap/}] [2] [3] (./main.aux) )
Here is how much of TeX's memory you used:
2104 strings out of 494923
30036 string characters out of 6180742
91561 words of memory out of 5000000
92561 words of memory out of 5000000
5406 multiletter control sequences out of 15000+600000
7755 words of font info for 28 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
41i,6n,32p,271b,187s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on main.pdf (2 pages, 76356 bytes).
Output written on main.pdf (3 pages, 77812 bytes).
PDF statistics:
35 PDF objects out of 1000 (max. 8388607)
24 compressed objects within 1 object stream
38 PDF objects out of 1000 (max. 8388607)
26 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
No preview for this file type
No preview for this file type
......@@ -56,9 +56,16 @@
Can ONLY be use when there is a linear path to the branch head from the parent head:
git checkout *parent_branch*
git merger *child_branch*
git merge *child_branch*
\subsection{3-Way Merging}
\item The normal merging scenario
\item We merge the original branch into the branch first before merging the branch back
\item This causes a messy commit graph
......@@ -105,12 +112,33 @@ Reset:
\item \texttt{git rm} removes a file from the working directory and the git index
\subsection{Rewriting History}
\subsection{Changing the base}
\item The primary goal of rebasing is to change the base of the working directory
\item \texttt{git rebase *base*} will change the base of commits made on the remote repo to be the specified commit
\item If we are working on a branch this creates a linear history; can do a fast-forward merge
\item The specified base can either be a commit hash or \texttt{HEAD~*num*} specifying a number of commits backwards from the HEAD
\subsection{Interactive Mode}
\item \texttt{git rebase} facilitates changing multiple or older commits
\item Public commits should never be rebased
\item \texttt{git squash} uses rebasing to combine multiple commits into one for a clean history
\item Rebasing with \texttt{-i} option turns on interactive mode
\item We can change the option for each commit
pick & The commit is included unchanged \\ \hline
reword & The commit is included with a reworded commit msg \\ \hline
edit & Rebasing will pause so the commit can be ammended \\ \hline
squash & The commit will be merged into the previous \\ \hline
drop & Remove commit \\ \hline
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment