Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
4bfd6853
Commit
4bfd6853
authored
6 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
completing git intro
parent
d7753385
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Doc/Sd1/Ref/Vc/gitlabNewProject.multi.svg
+301
-12930
301 additions, 12930 deletions
Doc/Sd1/Ref/Vc/gitlabNewProject.multi.svg
Doc/Sd1/appendix.xml
+214
-0
214 additions, 0 deletions
Doc/Sd1/appendix.xml
with
515 additions
and
12930 deletions
Doc/Sd1/Ref/Vc/gitlabNewProject.multi.svg
+
301
−
12930
View file @
4bfd6853
This diff is collapsed.
Click to expand it.
Doc/Sd1/appendix.xml
+
214
−
0
View file @
4bfd6853
...
...
@@ -2159,5 +2159,219 @@ Value 2147483645 is not prime.
</imageobject>
</mediaobject>
</figure>
<figure
xml:id=
"sd1_fig_media_gitClone"
>
<title>
Cloning a git project
</title>
<screen>
>
git clone git@gitlab.mi.hdm-stuttgart.de:goik/vcintro.git
Cloning into 'vcintro'...
warning:
<emphasis
role=
"red"
>
You appear to have cloned an empty repository
</emphasis>
.
</screen>
</figure>
<figure
xml:id=
"sd1_fig_media_gitCdIntoProject"
>
<title>
Enter project folder, add
<filename>
Readme.md
</filename></title>
<informaltable
border=
"0"
>
<tr>
<td
valign=
"top"
><screen>
>
cd vcintro/
>
vim Readme.md
>
git add Readme.md
</screen></td>
<td
valign=
"top"
><screen>
# Initial project description.
Will be extended when adding more assets.
</screen></td>
</tr>
</informaltable>
</figure>
<figure
xml:id=
"sd1_fig_media_gitCommitChangeset"
>
<title>
Committing change set
</title>
<informaltable
border=
"0"
>
<tr>
<td
valign=
"top"
><screen>
EDITOR=vim git commit Readme.md
</screen></td>
</tr>
<tr>
<td
valign=
"top"
><screen><emphasis
role=
"red"
>
Adding Readme file in Markdown format
</emphasis>
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
#
# Initial commit
#
# Changes to be committed:
# new file: Readme.md
</screen></td>
</tr>
</informaltable>
</figure>
<figure
xml:id=
"sd1_fig_media_gitPush"
>
<title>
Push to upstream repository
</title>
<screen>
>
git push
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 306 bytes | 306.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
<emphasis
role=
"red"
>
To gitlab.mi.hdm-stuttgart.de:goik/vcintro.git
</emphasis>
* [new branch] master -
>
master
</screen>
</figure>
<figure
xml:id=
"sd1_fig_gitCreateMaven"
>
<title>
Inserting a Maven project
</title>
<screen>
>
mvn --batch-mode -e archetype:generate -Dversion=0.9 \
>
-DgroupId=de.hdm_stuttgart.mi.sd1 \
>
-DartifactId=first -DarchetypeGroupId=de.hdm_stuttgart.mi \
>
-DarchetypeArtifactId=mi-maven-archetype-quickstart -DarchetypeVersion=1.2
</screen>
<screen>
>
find first/ -type f
first/.gitignore
first/src/test/java/de/hdm_stuttgart/mi/sd1/AppTest.java
first/src/main/java/de/hdm_stuttgart/mi/sd1/App.java
first/src/main/resources/log4j2.xml
first/pom.xml
</screen>
</figure>
<figure
xml:id=
"sd1_fig_gitInsertMavenStatus_1"
>
<title>
git status 1
</title>
<screen>
>
git status
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "
<emphasis
role=
"red"
>
git add
<
file
>
</emphasis>
..." to include in what will be committed)
<emphasis
role=
"red"
>
first/
</emphasis>
nothing added to commit
<emphasis
role=
"red"
>
but untracked files present
</emphasis>
(use "git add" to track)
</screen>
</figure>
<figure
xml:id=
"sd1_fig_gitAddMavenFiles"
>
<title>
Adding Maven files to repository
</title>
<screen>
>
<emphasis
role=
"red"
>
git add `find first/ -type f`
</emphasis>
>
git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD
<
file
>
..." to unstage)
new file: first/.gitignore
new file: first/pom.xml
new file: first/src/main/java/de/hdm_stuttgart/mi/sd1/App.java
new file: first/src/main/resources/log4j2.xml
new file: first/src/test/java/de/hdm_stuttgart/mi/sd1/AppTest.java
</screen>
</figure>
<figure
xml:id=
"sd1_fig_gitInsertMavenStatus_2"
>
<title>
git status 2
</title>
<screen>
>
git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD
<
file
>
..." to unstage)
new file: first/.gitignore
new file: first/pom.xml
new file: first/src/main/java/de/hdm_stuttgart/mi/sd1/App.java
new file: first/src/main/resources/log4j2.xml
new file: first/src/test/java/de/hdm_stuttgart/mi/sd1/AppTest.java
</screen>
</figure>
<figure
xml:id=
"sd1_fig_media_gitCommitMavenProjectFiles"
>
<title>
Commit Maven project files
</title>
<informaltable
border=
"0"
>
<tr>
<td
valign=
"top"
><screen>
EDITOR=vim git commit -a
</screen></td>
</tr>
<tr>
<td
valign=
"top"
><screen><emphasis
role=
"red"
>
Adding a Maven project.
</emphasis>
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is up to date with 'origin/master'.
#
# Changes to be committed:
# new file: first/.gitignore
# new file: first/pom.xml
# new file: first/src/main/java/de/hdm_stuttgart/mi/sd1/App.java
# new file: first/src/main/resources/log4j2.xml
# new file: first/src/test/java/de/hdm_stuttgart/mi/sd1/AppTest.java
</screen></td>
</tr>
</informaltable>
</figure>
<figure
xml:id=
"sd1_fig_gitInsertMavenStatus_3"
>
<title>
git status 3
</title>
<screen>
>
git status
On branch master
<emphasis
role=
"red"
>
Your branch is ahead of 'origin/master' by 1 commit.
</emphasis>
(use "git push" to publish your local commits)
nothing to commit, working tree clean
</screen>
</figure>
<figure
xml:id=
"sd1_fig_media_gitPushMaven"
>
<title>
Push to upstream again
</title>
<screen>
>
git push
Counting objects: 22, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (22/22), 3.31 KiB | 1.10 MiB/s, done.
Total 22 (delta 0), reused 0 (delta 0)
<emphasis
role=
"red"
>
To gitlab.mi.hdm-stuttgart.de:goik/vcintro.git
</emphasis>
32da2ff..4e19142 master -
>
master
</screen>
</figure>
<figure
xml:id=
"sd1_fig_media_gitUndoChanges"
>
<title>
Reverting changes
</title>
<screen>
>
git status
...
Changes not staged for commit:
(use "git add
<
file
>
..." to update what will be committed)
(use "git checkout --
<
file
>
..." to discard changes in working directory)
modified: Readme.md
</screen>
<screen>
git checkout -- Readme.md
</screen>
<screen>
>
git status
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
</screen>
</figure>
<figure
xml:id=
"sd1_fig_media_gitPull"
>
<title>
Pull changes from upstream
</title>
<screen>
>
git pull
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.
From gitlab.mi.hdm-stuttgart.de:goik/vcintro
3751344..83bd7b9 master -
>
origin/master
Updating 3751344..83bd7b9
Fast-forward
Readme.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
</screen>
</figure>
</section>
</appendix>
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