Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Git course
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
courses
Git course
Commits
d851ecee
Commit
d851ecee
authored
11 years ago
by
Laros
Browse files
Options
Downloads
Patches
Plain Diff
First version of the basics handouts.
parent
a3abe0e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
basics/basics_handouts.tex
+73
-0
73 additions, 0 deletions
basics/basics_handouts.tex
with
73 additions
and
0 deletions
basics/basics_handouts.tex
0 → 100644
+
73
−
0
View file @
d851ecee
\documentclass
{
article
}
\usepackage
{
fullpage
}
\frenchspacing
\setlength
{
\parindent
}{
0pt
}
\pagestyle
{
empty
}
\begin{document}
\begin{center}
{
\bf
Git Introduction Course
}
Git Basics practical.
\end{center}
\bigskip
\subsubsection*
{
Create a repository.
}
First, create an empty directory and use ``
\texttt
{
git init
}
'' to make a new
repository.
\begin{itemize}
\item
\emph
{
Question:
}
How can you see that you are working in a Git
repository?
\end{itemize}
\bigskip
Check the status of your files.
\bigskip
\subsubsection*
{
Your first commit.
}
Create a new file named ``README'' (with an editor, or by using the
``
\texttt
{
touch
}
'' command).
\begin{itemize}
\item
\emph
{
Question:
}
What is the status of this new file?
\end{itemize}
\bigskip
Stage this file for the next commit using ``
\texttt
{
git add
}
''.
\begin{itemize}
\item
\emph
{
Question:
}
What is the status of this file now?
\end{itemize}
\bigskip
Commit your changes.
\begin{itemize}
\item
\emph
{
Question:
}
What happened to the status?
\end{itemize}
\bigskip
\subsubsection*
{
Manipulation in the staging area.
}
Edit your file and stage it.
\bigskip
Now remove the file from the staging area.
\bigskip
\subsubsection*
{
Working with versions.
}
Commit your changed file.
\bigskip
Now you change your mind, and want to revert this commit.
\begin{itemize}
\item
\emph
{
Hint:
}
Use ``
\texttt
{
git log
}
'' to see a list of all your
versions.
\end{itemize}
\bigskip
Edit your file again and check the differences with your last commit.
\begin{itemize}
\item
\emph
{
Question:
}
What is the difference with your first commit?
\end{itemize}
\bigskip
Make a file that you do not want to track.
\end{document}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment