Skip to content

Commit 2007592

Browse files
committed
Git tasks.
1 parent bdd7fa4 commit 2007592

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

presentation/linux_bash_metacentrum_course.tex

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4698,6 +4698,7 @@ \subsection{Git basics}
46984698
# Add files to trace with Git
46994699
# Ignored files (or patterns) can be listed in .gitignore file
47004700
git add <files> # Or "git add *"
4701+
git status # See changed files, commits in stagging, etc.
47014702
\end{bashcode}
47024703
\end{frame}
47034704
@@ -4748,11 +4749,12 @@ \subsection{Git basics}
47484749
\begin{frame}[fragile]{Working with Git --- settings and more}
47494750
\begin{itemize}
47504751
\item Basically repeat in \texttt{git} \texttt{add}, \texttt{commit} and \texttt{push} to get your work to the repository, and \texttt{fetch} and \texttt{pull} to download news from central repository
4751-
\item \texttt{diff} to see local changes
4752+
\item \texttt{diff} to see local changes, \texttt{status} to see state
47524753
\item \texttt{log} and \texttt{branch} show history and branches
4753-
\item \texttt{branch} and \texttt{merge} for branching code and merging changes back to master (main) branch
4754+
\item \texttt{branch}, \texttt{checkout} and \texttt{merge} for branching code and merging changes back to master (main) branch
47544755
\end{itemize}
47554756
\begin{bashcode}
4757+
git diff # See changes in particular text files
47564758
gitk # Graphical interface
47574759
git config color.ui true # Set output to be colored
47584760
git config format.pretty oneline # Nicer log output
@@ -4762,11 +4764,20 @@ \subsection{Git basics}
47624764
\end{bashcode}
47634765
\end{frame}
47644766
4765-
% \begin{frame}{Git tasks} % TODO Add Git tasks
4766-
% \begin{itemize}
4767-
% \item
4768-
% \end{itemize}
4769-
% \end{frame}
4767+
\subsection{}
4768+
4769+
\begin{frame}{Git tasks}
4770+
\begin{enumerate}
4771+
\item Clone over SSH repository \texttt{USER@vyuka.natur.cuni.cz:/home/dadaism} (use your credentials on the testing server) and go to \texttt{dadaism} directory.
4772+
\item Add some text files, edit existing text files. Do not add images or another non-text files, do not add large files.
4773+
\item Push your changes back to the repository.
4774+
\item Fetch changes done by others.
4775+
\item See history of changes, who did what, etc.
4776+
\item Use at least \texttt{git} commands \texttt{clone},\texttt{diff}, \texttt{status}, \texttt{add}, \texttt{commit}, \texttt{push}, \texttt{fetch}, \texttt{pull}, \texttt{log} and \texttt{gitk}.
4777+
\item You can try to play with branches --- \texttt{branch}, \texttt{checkout}, \texttt{merge}.
4778+
\item communicate with others to avoid conflicting edits.
4779+
\end{enumerate}
4780+
\end{frame}
47704781
47714782
\section{Administration}
47724783

0 commit comments

Comments
 (0)