Skip to content

Commit 2f19c1c

Browse files
thewtexkwrobot
authored andcommitted
Merge topic 'github-cheatsheet'
ffdca09 DOC: Update ITK Git Reference for GitHub
2 parents d3b6475 + ffdca09 commit 2f19c1c

2 files changed

Lines changed: 31 additions & 24 deletions

File tree

Documentation/GitCheatSheet.pdf

88.4 KB
Binary file not shown.

Documentation/GitCheatSheet.tex

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ \subsection*{One-time Global Setup}
6161
\subsection*{Create and Configure Your Repository}
6262
\begin{category}{Clone Repository}
6363
\parbox[t]{0.6\cvmain}{%
64-
\texttt{git clone --recursive git://itk.org/ITK.git\\ cd ITK}
64+
\texttt{git clone https://github.com/InsightSoftwareConsortium/ITK\\ cd ITK}
6565
}
6666
\parbox[t]{0.38\cvmain}{%
67-
Clones the source tree.
6867
}
6968
\end{category}
7069
\begin{category}{Configure}
@@ -79,15 +78,15 @@ \subsection*{Create and Configure Your Repository}
7978
\subsection*{Topic Branch Lifecycle}
8079
\begin{category}{Update}
8180
\parbox[t]{0.6\cvmain}{%
82-
\texttt{git status\\ git checkout master\\ git pull --rebase}
81+
\texttt{git status\\ git checkout master\\ git pull --rebase upstream master}
8382
}
8483
\parbox[t]{0.38\cvmain}{%
8584
Review local modifications, delete, stash or commit them.
8685
}
8786
\end{category}
8887
\begin{category}{New Topic Branch}
8988
\parbox[t]{0.6\cvmain}{%
90-
\texttt{git checkout -b my-topic origin/master}
89+
\texttt{git checkout -b my-topic upstream/master}
9190
}
9291
\parbox[t]{0.38\cvmain}{%
9392
Create branch off master.
@@ -114,7 +113,7 @@ \subsection*{Topic Branch Lifecycle}
114113
\begin{category}{Amend Commit}
115114
\parbox[t]{0.6\cvmain}{%
116115
\texttt{vim MyExistingFile.cxx\\
117-
git addd MyExistingFile.cxx\\
116+
git add MyExistingFile.cxx\\
118117
git commit --amend}
119118
}
120119
\parbox[t]{0.38\cvmain}{%
@@ -123,48 +122,56 @@ \subsection*{Topic Branch Lifecycle}
123122
Amend previous commit locally.
124123
}
125124
\end{category}
126-
\begin{category}{Submit for Review}
125+
\begin{category}{Add Testing Data}
127126
\parbox[t]{0.6\cvmain}{%
128-
\texttt{git prepush\\ git gerrit-push}
127+
\texttt{git data-upload DataFile.png\\
128+
\# Add DATA\{DataFile.png\} to CMakeLists.txt\\
129+
git add -- DataFile.png.sha512 CMakeLists.txt\\
130+
git commit --amend}
129131
}
130132
\parbox[t]{0.38\cvmain}{%
131-
Check what will be pushed to Gerrit.\\
132-
Push the topic to Gerrit for review.
133+
Upload a testing data input or baseline image to
134+
\href{https://data.kitware.com}{data.kitware.com}.\\
135+
Reference the content link in the CMake configuration.\\
136+
Add the content link and updated CMake configuration.
133137
}
134138
\end{category}
135-
\begin{category}{Respond to Review}
139+
\begin{category}{Submit for Review}
136140
\parbox[t]{0.6\cvmain}{%
137-
\texttt{git rebase -i HEAD~3\\ git prepush\\ git gerrit-push}
141+
\texttt{git prepush\\ git review-push}
138142
}
139143
\parbox[t]{0.38\cvmain}{%
140-
Modify local commits (3 back here).\\
141-
Check what will be pushed to Gerrit.\\
142-
Push the updated topic to Gerrit.
144+
Check what will be pushed to GitHub.\\
145+
Push the topic to GitHub for review.
146+
Enter the URL returned in your browser, and review and open the pull request.
143147
}
144148
\end{category}
145-
\begin{category}{Merge Topic}
149+
\begin{category}{Respond to Review}
146150
\parbox[t]{0.6\cvmain}{%
147-
\texttt{git stage-push\\ git stage-merge}
151+
% sim -> Improved tilde
152+
\texttt{git rebase -i HEAD{\raise.17ex\hbox{$\scriptstyle\sim$}}3\\ git prepush\\ git review-push --force}
148153
}
149154
\parbox[t]{0.38\cvmain}{%
150-
Stage the topic branch.\\
151-
Merge the topic branch to master.
155+
Modify local commits (3 back here).\\
156+
Check what will be pushed to Gerrit.\\
157+
Push the updated topic to Gerrit.
152158
}
153159
\end{category}
154160
\begin{category}{Delete Topic}
155161
\parbox[t]{0.6\cvmain}{%
156-
\texttt{git fetch\\ git branch -d my-topic}
162+
\texttt{git fetch upstream\\ git branch -d my-topic}
157163
}
158164
\parbox[t]{0.38\cvmain}{%
159165
Fetch the latest changes from origin.\\
160166
Delete topic, fails if not merged.
161167
}
162168
\end{category}
163169

170+
\newpage
164171
\subsection*{Review}
165172
\begin{category}{Push for Review}
166173
\parbox[t]{0.6\cvmain}{%
167-
\texttt{git-review-push}
174+
\texttt{git review-push}
168175
}
169176
\parbox[t]{0.38\cvmain}{%
170177
Push the current topic branch for review.
@@ -190,13 +197,13 @@ \subsection*{Review}
190197
\subsection*{General Guidelines}
191198
\begin{category}{Commit Message}
192199
\parbox[t]{0.6\cvmain}{%
193-
\texttt{<short-description>\\ \\ <long description>\\ refs \#1234}
200+
\texttt{<short-description>\\ \\ <long description>\\ Issue \#1234}
194201
}
195202
\parbox[t]{0.38\cvmain}{%
196-
Should be less than 60 characters.\\
203+
Should be less than 78 characters.\\
197204
Blank line after short description.\\
198205
Could be several paragraphs.\\
199-
Mantis issue number if applicable.
206+
GitHub issue number, if applicable.
200207
}
201208
\end{category}
202209
\begin{category}{Topic Naming}
@@ -213,4 +220,4 @@ \subsection*{General Guidelines}
213220
For more information, see \href{https://git-scm.com/}{git-scm.com}.
214221
\end{center}
215222

216-
\end{document}
223+
\end{document}

0 commit comments

Comments
 (0)