<
From version < 24.1 >
edited by msp
on 2012/10/15 14:46
To version < 23.1 >
edited by msp
on 2012/10/15 12:14
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,7 +2,7 @@
2 2  
3 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.
4 4  
5 -= Creating Commits =
5 += Repositories and Commits =
6 6  
7 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 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,21 +9,17 @@
9 9  1. (((
10 10  Create a local repository for the "//Turing Project//":
11 11  
12 -{{noformat}}
12 +{{noformat nopanel="true"}}
13 13  $ mkdir turing
14 14  $ cd turing
15 15  $ git init
16 16  Initialized empty Git repository in ~/turing/.git/
17 17  {{/noformat}}
18 -
19 -{{panel}}
20 -**$ mkdir turing $ cd turing $ git init**{{code language="none"}} Initialized empty Git repository in ~/turing/.git/{{/code}}
21 -{{/panel}}
22 22  )))
23 23  1. (((
24 -Add some content: copy [[attach:notes.txt]]{{code language="none"}}{{/code}} to your {{code language="none"}}turing{{/code}} directory.
20 +Add some content: copy [[attach:notes.txt]] to your {{code language="none"}}turing{{/code}} directory.
25 25  
26 -{{noformat}}
22 +{{noformat nopanel="true"}}
27 27  $ git add notes.txt
28 28  $ git commit -m "wrote some first notes"
29 29  [master (root-commit) 2e73b34] wrote some first notes
... ... @@ -31,54 +31,3 @@
31 31   create mode 100644 notes.txt
32 32  {{/noformat}}
33 33  )))
34 -1. Edit {{code language="none"}}notes.txt{{/code}}:\\
35 -11. Replace "fixed" with "infinite" in line 1.
36 -11. Replace "... (TODO)" with "a finite state machine" in line 4.
37 -1. (((
38 -Commit the modified content to your local repository:
39 -
40 -{{noformat}}
41 -$ git add notes.txt
42 -$ git commit -m "modified tape length, found a controller for tape head"
43 -[master 3f28a0e] modified tape length, found a controller for tape head
44 - 1 files changed, 2 insertions(+), 2 deletions(-)
45 -{{/noformat}}
46 -)))
47 -
48 -After the preceding steps you have two commits in your local repository, each with one file in the index. You have different options for viewing these commits:
49 -
50 -{{noformat}}
51 -$ git log
52 -commit 3f28a0e473bf3da4aff34a09fed838fe033f3bb5
53 -Author: Miro Spoenemann <msp@informatik.uni-kiel.de>
54 -Date: Mon Oct 15 14:30:24 2012 +0200
55 -
56 - modified tape length, found a controller for tape head
57 -
58 -commit 2e73b34ac44480773fc0e52875b7353a087d8c6d
59 -Author: Miro Spoenemann <msp@informatik.uni-kiel.de>
60 -Date: Mon Oct 15 12:14:06 2012 +0200
61 -
62 - wrote some first notes
63
64 -$ git show 3f28a0e
65 -commit 3f28a0e473bf3da4aff34a09fed838fe033f3bb5
66 -Author: Miro Spoenemann <msp@informatik.uni-kiel.de>
67 -Date: Mon Oct 15 14:30:24 2012 +0200
68 -
69 - modified tape length, found a controller for tape head
70 -
71 -diff --git a/notes.txt b/notes.txt
72 -index 4ded2b3..bd422b3 100644
73 ---- a/notes.txt
74 -+++ b/notes.txt
75 -@@ -1,5 +1,5 @@
76 -- * A tape with fixed length
77 -+ * A tape with infinite length
78 - * Tape head can read or write data
79 - * Tape head can move left or right
80 -- * The head is controlled by ... (TODO)
81 -+ * The head is controlled by a finite state machine
82 -{{/noformat}}
83 -
84 -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.
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -2982116
1 +2982114
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/WS12EclPract/pages/2982116/Git
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/WS12EclPract/pages/2982114/Git