You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\begin{frame}[allowframebreaks]{Git and version control}
4362
4363
\begin{itemize}
4363
4364
\item\href{https://git-scm.com/}{Git} is \href{https://en.wikipedia.org/wiki/Version_control}{version controlling} system --- it traces changes among all versions --- absolutely crucial for any software development
4364
-
\item\href{https://github.com/}{GitHub} is currently probably the most popular platform to host development of open-source projects, see \href{https://help.github.com/}{documentation}
4365
-
\item Older (nowadays not so common) version controlling systems is Subversion (SVN), there are many more (Bazaar,~\ldots)
4365
+
\item Older (nowadays not so common) version controlling systems is Subversion (SVN), there are many more (Bazaar, Mercurial,~\ldots)
4366
4366
\item Probably the best textbook for Git is \href{https://git-scm.com/book/en/v2}{Chacon's Pro Git}
4367
4367
\begin{itemize}
4368
4368
\item Dostupná i~\href{https://git-scm.com/book/cs/v2}{česky} (včetně \href{https://knihy.nic.cz/}{prvního vydání})
4369
4369
\end{itemize}
4370
4370
\item Changes and their history is stored in repository (local or network, shared or private) --- it is possible to view any historical state and differences between any versions
4371
4371
\item It is possible to trace who and when did what
4372
4372
\item Branching and merging of branches helps with making of big changes
4373
+
\item Users work on a project in some directory as usually and from time to time commit local changes to stagging (temporal area) and then push them to remote or local repository (directory storing all Git history of particular project, can be anywhere)
4374
+
\item Every commit is checkpoint in the history
4375
+
\begin{itemize}
4376
+
\item Can be tagged (named), e.g. particular released version of software, or project stage
4377
+
\item User can compare any two commits or commit and current state
4378
+
\end{itemize}
4379
+
\item Code can be branched
4380
+
\begin{itemize}
4381
+
\item When new branch is created, it contains copy of current state
4382
+
\item User selects in which branch she/he is working, the branches are diverging, user can commit in every branch independently
4383
+
\item Commits in various branches can be compared and branches can be merged again
4384
+
\item Key feature of Git --- branches are useful when user starts to work on any big change in the project
4385
+
\end{itemize}
4386
+
\item Stagging area serves as local \enquote{container} of changes to be pushed to central Git repository (or to be modified, discarded)
4387
+
\begin{itemize}
4388
+
\item It is very hard to do any change in the central Git repository (e.g. to remove accidentaly pushed file or change description)
4389
+
\end{itemize}
4390
+
\item Central repository keeps whole history of the project
4391
+
\begin{itemize}
4392
+
\item Every user has full copy of the central Git repository --- can be large
4393
+
\item Can be placed on some server, network disk, in the local computer,~\ldots
4394
+
\end{itemize}
4395
+
\item Git was developed by Linus to trace development of Linux kernel, now it is probably the most used version control tool, used also by Microsoft to trace development of Windows :-)
4396
+
\end{itemize}
4397
+
\end{frame}
4398
+
4399
+
\begin{frame}{GitHub and others}
4400
+
\begin{itemize}
4401
+
\item\href{https://github.com/}{GitHub} is currently probably the most popular platform to host development of open-source projects, see \href{https://help.github.com/}{documentation}
4402
+
\item Probably second most common on-line service providing Git repository is \href{https://about.gitlab.com/}{GitLab}
4403
+
\begin{itemize}
4404
+
\item User can create an account on GitLab (as on GitHub), or download and install GitLab system on own server
4405
+
\end{itemize}
4406
+
\item\href{https://sourceforge.net/}{SourceForge} used to be more popular in the past, still harbours plenty of interesting projects
4407
+
\item For on-line services, many tools are available only for paying customers
4408
+
\item All such services provide Git repositories accessible through standard tools (from command line, see further; or from some special application)
4409
+
\begin{itemize}
4410
+
\item Exact usage might differ from standard Git, check respective help pages first
4411
+
\end{itemize}
4412
+
\item Git repository can be easily hosted e.g. on any Linux server\ldots
4373
4413
\end{itemize}
4374
4414
\end{frame}
4375
4415
@@ -4392,7 +4432,7 @@ \section{Git} % TODO More general info about Git, separate GitHub to extra slide
4392
4432
\end{itemize}
4393
4433
\end{itemize}
4394
4434
\begin{center}
4395
-
\includegraphics[height=5.75cm]{git.png}
4435
+
\includegraphics[height=6.5cm]{git.png}
4396
4436
\end{center}
4397
4437
\begin{flushright}
4398
4438
\begin{footnotesize}
@@ -4402,10 +4442,14 @@ \section{Git} % TODO More general info about Git, separate GitHub to extra slide
4402
4442
\end{multicols}
4403
4443
\end{frame}
4404
4444
4445
+
\subsection{Git basics}
4446
+
4405
4447
\begin{frame}[fragile]{Working with Git --- start and sending changes}
4406
4448
\begin{bashcode}
4407
-
# Create a new repository for new project
4449
+
# Create a new repository for new project (in empty directory)
4408
4450
git init # No need when cloning from existing repository
4451
+
# Create a new central repository (e.g. on a server) in empty directory
4452
+
git init --bare
4409
4453
# Or checkout (make a copy) for another local or remote repository
0 commit comments