-
Notifications
You must be signed in to change notification settings - Fork 0
/
Git_Tutorial.rtf
59 lines (49 loc) · 1.69 KB
/
Git_Tutorial.rtf
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
{\rtf1\ansi\ansicpg1252\cocoartf2580
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\fnil\fcharset0 Menlo-Regular;
\f3\fnil\fcharset0 Menlo-Bold;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red0\green0\blue0;}
{\*\expandedcolortbl;;\csgray\c0;\cssrgb\c0\c0\c0;}
\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\b\fs28 \cf0 Git Commands
\f1\b0\fs24 \
\
\
\f0\b Create new Branch:
\f1\b0 \
git checkout -b [name of branch]\
\
\f0\b Push files to branch:
\f1\b0 \
git add [url]\
git commit -a -m \'93\'85\'94\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
\f2\fs22 \cf2 \CocoaLigature0 git push (\'97set-upstream origin testBranch) <- nur beim ersten Mal\
git push --set-upstream origin sprint03_error_handling\
\
\f3\b Merge Branch to Main:
\f2\b0 \
git checkout main -> in main branch wechseln\
git merge [name of branch]\
git push\
\
\f3\b git status
\f2\b0 -> in welchem Branch bin ich gerade?\
\
\f3\b Delete Branch:
\f2\b0 (vorher in einen anderen branch wechseln)\
git branch -d [name of branch]\
git push \'97delete origin [name of branch]\
\
\f3\b Delete Files in a Branch:
\f2\b0 \
git rm [url]\
git commit -a -m \'93\'85\'94\
git push\
\
\f3\b Pull from Branch (when it only exists remotely and not locally yet):\
\pard\pardeftab720\partightenfactor0
\f2\b0 \cf3 \expnd0\expndtw0\kerning0
\CocoaLigature1 \outl0\strokewidth0 \strokec3 git fetch origin\
git checkout --track origin/<remote_branch_name>\
}