Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
git-tutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Nilsson
git-tutorial
Commits
846bf870
Commit
846bf870
authored
12 years ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
Addded chaos figure and some motivation
parent
95390dea
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
chaos.png
+0
-0
0 additions, 0 deletions
chaos.png
git-tutorial.tex
+37
-2
37 additions, 2 deletions
git-tutorial.tex
with
37 additions
and
2 deletions
chaos.png
0 → 100644
+
0
−
0
View file @
846bf870
46.6 KiB
This diff is collapsed.
Click to expand it.
git-tutorial.tex
+
37
−
2
View file @
846bf870
...
...
@@ -21,6 +21,29 @@
\section
{
Introduction
}
\label
{
sec:intro
}
Why use git, or any other version control software to keep track of
files? In short there are at least three big reasons why you should
version control your files, two of which are valid also if you work
all by yourself. See Figure~
\ref
{
fig:chaos
}
for an illustration of the
first two reasons listed below:
\begin{description}
\item
[Backups:]
With version control you always have previous versions
of your files available, if you happen to do something stupid like
erasing a file. Or just regret a large edit later on.
\item
[Organization:]
Knowing which copy of a project directory is up
to date, and which ones are not, saves a lot of time and problems.
\item
[Collaboration:]
Everyone who has tried to collaborate with other
people by sending files, or parts of files, over email knows how
fragile that is.
\end{description}
\begin{figure}
[h!]
\centering
\pgfimage
[width=.9\textwidth]
{
chaos.png
}
\caption
{
Typical(?) result after version control by renaming.
}
\label
{
fig:chaos
}
\end{figure}
\section
{
Git Tools
}
\label
{
sec:tools
}
...
...
@@ -57,7 +80,18 @@ people.
\subsection
{
Standalone Repository
}
\label
{
sec:standalone
}
The simplest use case is that of one single developer, one local
repository.
repository. Files in a project versioned with git go through the
following stages as you work on them, see Figure~
\ref
{
fig:lifecycle
}
:
\begin{description}
\item
[Untracked:]
Git does not know anything about untracked files.
\item
[Tracked, unmodified:]
Git knows about these files, and there
have been no changes to them since lst commit.
\item
[Tracked, modified:]
Files tracked by git, there are changes made
to the file since last commit but git does not know whether these
changes should go into next commit.
\item
[Staged:]
The changes made to this file will be committed next
time you perform a commit.
\end{description}
\begin{figure}
[h!]
\centering
...
...
@@ -289,7 +323,8 @@ To stodola.control.lth.se:work/computers/git-tutorial
\verb
|
http://git-scm.com/documentation
|
or
\\
\verb
|
http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_grey.pdf
|
\item
The
\emph
{
Pro Git
}
book is available online:
\verb
|
http://git-scm.com/book
|
\item
The extensive
\emph
{
Pro Git
}
handbook is available for free
online:
\verb
|
http://git-scm.com/book
|
\end{itemize}
\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