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
106a54a1
Commit
106a54a1
authored
12 years ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
Before showing conflicts and merge
parent
7c8a691e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
git-tutorial.tex
+35
-2
35 additions, 2 deletions
git-tutorial.tex
with
35 additions
and
2 deletions
git-tutorial.tex
+
35
−
2
View file @
106a54a1
...
...
@@ -370,13 +370,46 @@ users; myself at home and myself at work.
\subsubsection*
{
diff
}
\label
{
diff
}
\verb
|
git diff
|
shows the differences between two revisions of a
file. When no revisions are given as arguments it lists the
differences to the latest committed revision.
\begin{lstlisting}
andersn@stodola: git diff git-tutorial.tex
diff --git a/git-tutorial.tex b/git-tutorial.tex
index dfcd562..3e66f5d 100644
--- a/git-tutorial.tex
+++ b/git-tutorial.tex
@@ -370,7 +370,12 @@ users; myself at home and myself at work.
\subsubsection*
{
diff
}
\label
{
diff
}
+
\verb
|
git diff
|
shows the differences between two revisions of a
+file. When no revisions are given as arguments it lists the
+differences to the latest committed revision.
\subsubsection*
{
merge
}
\label
{
merge
}
\end{lstlisting}
\subsubsection*
{
blame
}
\label
{
blame
}
If we are interested in finding out exactly who is responsible for
some information in a file, and when it was committed, we can use
\verb
|
git blame <file>
|
. In the example below we only show a small
excerpt of the output, the real output is a fully annotated version of
the file given as argument.
\begin{lstlisting}
[ basicstyle=
\tiny\ttfamily
]
7c8a691e (Anders Nilsson 2013-03-20 11:07:17 +0100 370)
7c8a691e (Anders Nilsson 2013-03-20 11:07:17 +0100 371)
\subsubsection*
{
diff
}
7c8a691e (Anders Nilsson 2013-03-20 11:07:17 +0100 372)
\label
{
diff
}
00000000 (Not Committed Yet 2013-03-20 11:27:53 +0100 373)
\verb
|
git diff
|
shows the diffe
00000000 (Not Committed Yet 2013-03-20 11:27:53 +0100 374) file. When no revisions are giv
00000000 (Not Committed Yet 2013-03-20 11:27:53 +0100 375) differences to the latest commi
\end{lstlisting}
\subsubsection*
{
merge
}
\label
{
merge
}
...
...
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