-
Notifications
You must be signed in to change notification settings - Fork 0
/
examples.txt
66 lines (47 loc) · 963 Bytes
/
examples.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
### Erstes Beispiel
mkdir projekt
cd projekt
git init
# File first.txt erstellen und mit Inhalt füllen
git status
git add first.txt
git status
git commit -m "Initial commit."
git status
### Editing
# Edit first.txt
git status
git diff
git add first.txt
git diff
git commit -m "Changed a line."
### Github
### Branching
git branch
git branch feature-x
git branch
git checkout feature-x
# File feature-x.txt erstellen und füllen.
# direkter Weg: git checkout -b feature-x
git add feature-x.txt
git commit -m "Start work on feature x."
git branch
git checkout master
ls
git checkout feature-x
ls
git checkout master
git merge feature-x
### Log
git log
git log -n3
### Die kleinen Helferlein
# Alles was noch nicht committed wurde zurücksetzen
git reset --hard
# File so zurücksetzen, wie es im origin/master ist
git checkout file.txt
# Commit message ändern
git commit --amend
# .gitignore zeigen
# Wer hat was verbrochen?
git blame file.txt