Skip to content

Add information about Git workflows to 01-git #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 76 additions & 2 deletions 01-git.tex
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,90 @@ \section{Basic Git commands}

\section{Git workflows overview}

\begin{frame}{Push to master (linear history approach)}
\begin{frame}{Push to Master (Linear history approach)}
\begin{itemize}
\item All changes are made directly to the \texttt{master} branch.
\item Simplest workflow, suitable for small projects.
\item Potential issues:
\begin{itemize}
\item Conflicts when multiple developers push simultaneously.
\item No isolation for new features or bug fixes.
\end{itemize}
\end{itemize}
\end{frame}

\begin{frame}{Use of "feature branches"}
\begin{frame}{Using Feature Branches}
\begin{itemize}
\item Create separate branches for new features or bug fixes.
\item Benefits:
\begin{itemize}
\item Isolates development work.
\item Facilitates code reviews.
\item Safe integration into \texttt{master} after testing.
\end{itemize}
\item Workflow:
\begin{enumerate}
\item Create a new branch: \texttt{git checkout -b <feature-branch>}
\item Develop and commit changes on the feature branch.
\item Merge back into \texttt{master} when ready.
\end{enumerate}
\end{itemize}
\end{frame}

\begin{frame}{GitHub Flow}
\begin{itemize}
\item Lightweight, branch-based workflow suitable for continuous deployment.
\item Steps:
\begin{enumerate}
\item \textbf{Create a branch} for your work.
\item \textbf{Commit} changes to your branch.
\item \textbf{Open a Pull Request} when your work is ready.
\item \textbf{Discuss and review} your code.
\item \textbf{Merge} the Pull Request once approved.
\item \textbf{Deploy} to production.
\end{enumerate}
\item Benefits:
\begin{itemize}
\item Emphasizes collaboration and code quality.
\item Organized workflow for medium projects (a team or several teams that consist of several people).
\end{itemize}
\end{itemize}
\end{frame}

\begin{frame}{GitHub Flow}
\begin{figure}[h]
\centering
\includegraphics[width=1\textwidth]{images/github-flow.png}
\label{fig:github-flow}
\end{figure}
{\footnotesize Source: \href{https://github.com/a-a-ron/Github-Flow}{https://github.com/a-a-ron/Github-Flow}}
\end{frame}

\begin{frame}{Git Flow}
\begin{itemize}
\item A robust branching model for managing releases.
\item Defines specific branches:
\begin{itemize}
\item \textbf{master} - contains production-ready code.
\item \textbf{develop} - integration branch for features.
\item \textbf{feature branches} - for new features.
\item \textbf{release branches} - prepare for a new production release.
\item \textbf{hotfix branches} - quick fixes for production.
\end{itemize}
\item Benefits:
\begin{itemize}
\item Organized workflow for large projects.
\item Clear separation of different types of work.
\end{itemize}
\end{itemize}
\end{frame}

\begin{frame}{Git Flow}
\begin{figure}[h]
\centering
\includegraphics[height=0.87\textheight]{images/git-flow.png}
\label{fig:git-flow}
\end{figure}
\end{frame}

\begin{frame}
Expand Down
Binary file added images/git-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/github-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading