<
From version < 26.1 >
edited by msp
on 2012/10/15 14:53
To version < 19.1 >
edited by cds
on 2012/10/15 11:19
>
Change comment: Task marked complete

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.msp
1 +XWiki.cds
Content
... ... @@ -1,80 +1,19 @@
1 -This tutorial will address the source code management (SCM) tool named [[Git>>url:http://git-scm.com/||shape="rect"]]. By following these steps you should learn about the basic usage of Git, which is required for the whole practical course. Furthermore, Git is a great SCM tool, and it's good to know how to use it. During this tutorial, we will follow Alan Turing's thoughts towards developing the [[Turing Machine>>url:http://en.wikipedia.org/wiki/Turing_machine||shape="rect"]].
1 +This tutorial will address the source code management (SCM) tool named [[Git>>url:http://git-scm.com/||shape="rect"]].
2 2  
3 - More in-depth documentation can be found on the [[official home page>>url:http://git-scm.com/documentation||shape="rect"]], which mentions books, videos, and links to other tutorials and references.
3 += Repositories and Commits =
4 4  
5 -= Creating Commits =
5 +{{task-list}}
6 +{{task id="1" status="complete"}}
7 +test1
8 +{{/task}}
6 6  
7 -1. Read the [[Git for Computer Scientists>>url:http://eagain.net/articles/git-for-computer-scientists/||shape="rect"]] introduction (skip this if you are already familiar with Git).
8 -1. For Linux, Git is available in its own package. Windows users can install [[msysGit>>url:http://msysgit.github.com/||shape="rect"]]. For MacOS, Git is available as part of [[Xcode>>url:https://developer.apple.com/xcode/||shape="rect"]]; if you cannot install that, use [[Git for OSX>>url:http://code.google.com/p/git-osx-installer/||shape="rect"]].
9 -1. (((
10 -Create a local repository for the "//Turing Project//":
10 +{{task id="2" status="incomplete"}}
11 +test2
12 +{{/task}}
11 11  
12 -{{noformat}}
13 -$ mkdir turing
14 -$ cd turing
15 -$ git init
16 -Initialized empty Git repository in ~/turing/.git/
17 -{{/noformat}}
18 -)))
19 -1. (((
20 -Add some content: copy [[attach:notes.txt]]{{code language="none"}}{{/code}} to your {{code language="none"}}turing{{/code}} directory.
14 +{{task id="3" status="incomplete"}}
15 +test 3
16 +{{/task}}
17 +{{/task-list}}
21 21  
22 -{{noformat}}
23 -$ git add notes.txt
24 -$ git commit -m "wrote some first notes"
25 -[master (root-commit) 2e73b34] wrote some first notes
26 - 1 files changed, 5 insertions(+), 0 deletions(-)
27 - create mode 100644 notes.txt
28 -{{/noformat}}
29 -)))
30 -1. Edit {{code language="none"}}notes.txt{{/code}}:\\
31 -11. Replace "fixed" with "infinite" in line 1.
32 -11. Replace "... (TODO)" with "a finite state machine" in line 4.
33 -1. (((
34 -Commit the modified content to your local repository:
35 -
36 -{{noformat}}
37 -$ git add notes.txt
38 -$ git commit -m "modified tape length, found a controller for tape head"
39 -[master 3f28a0e] modified tape length, found a controller for tape head
40 - 1 files changed, 2 insertions(+), 2 deletions(-)
41 -{{/noformat}}
42 -)))
43 -
44 -After the preceding steps you have two commits in your local repository, each with one file in the index. You have different commands for viewing these commits:
45 -
46 -{{noformat}}
47 -$ git log
48 -commit 3f28a0e473bf3da4aff34a09fed838fe033f3bb5
49 -Author: Miro Spoenemann <msp@informatik.uni-kiel.de>
50 -Date: Mon Oct 15 14:30:24 2012 +0200
51 -
52 - modified tape length, found a controller for tape head
53 -
54 -commit 2e73b34ac44480773fc0e52875b7353a087d8c6d
55 -Author: Miro Spoenemann <msp@informatik.uni-kiel.de>
56 -Date: Mon Oct 15 12:14:06 2012 +0200
57 -
58 - wrote some first notes
59
60 -$ git show 3f28a0e
61 -commit 3f28a0e473bf3da4aff34a09fed838fe033f3bb5
62 -Author: Miro Spoenemann <msp@informatik.uni-kiel.de>
63 -Date: Mon Oct 15 14:30:24 2012 +0200
64 -
65 - modified tape length, found a controller for tape head
66 -
67 -diff --git a/notes.txt b/notes.txt
68 -index 4ded2b3..bd422b3 100644
69 ---- a/notes.txt
70 -+++ b/notes.txt
71 -@@ -1,5 +1,5 @@
72 -- * A tape with fixed length
73 -+ * A tape with infinite length
74 - * Tape head can read or write data
75 - * Tape head can move left or right
76 -- * The head is controlled by ... (TODO)
77 -+ * The head is controlled by a finite state machine
78 -{{/noformat}}
79 -
80 -Note that each commit is identified by a looong hash value, but it is possible to use only a prefix when referencing them (if the prefix is not ambiguous): the example above uses {{code language="none"}}3f28a0e{{/code}} to identify the second commit. Also try the command {{code language="none"}}gitk{{/code}} to get an overview of your commits (a better alternative available for MacOS is [[GitX>>url:http://gitx.frim.nl/||shape="rect"]]).
19 +\\
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -2982120
1 +2982103
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/WS12EclPract/pages/2982120/Git
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/WS12EclPract/pages/2982103/Git