Skip to content

Commit 45ca1fe

Browse files
committed
Reformatted git-workflow.md
1 parent 6e8eefe commit 45ca1fe

File tree

1 file changed

+55
-52
lines changed

1 file changed

+55
-52
lines changed

git-workflow.md

Lines changed: 55 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,83 @@
1-
# Git Workflows
2-
##### Atau bisa dibilang cara kerja menggunakan Git
1+
# Git Workflows
2+
3+
Atau bisa dibilang *cara kerja menggunakan Git*
34

45
## Alumni Subversion
5-
#### Ciri khas :
6+
### Ciri khas:
67
- Semua commit dicampur di trunk
78
- Commit per online, bukan per task
8-
- Branch cuma untuk maintenance rilis
9+
- Branch hanya untuk maintenance rilis
910

10-
#### Cara kerja :
11+
### Cara kerja:
1112
- Clone repo
12-
```
13-
$ git clone myrepo
14-
```
13+
14+
$ git clone myrepo
15+
1516
- Hacking / rubah code
16-
```
17-
$ git commit -am "log message"
18-
$ git pull
19-
```
17+
- Commit
18+
19+
$ git commit -am "log message"
20+
$ git pull
21+
2022
- Resolve conflicts
21-
```
22-
$ git push
23-
```
23+
- Push
2424

25-
#### Outcome :
25+
$ git push
26+
27+
28+
### Outcome:
2629
- Commit gak jelas juntrungannya
2730
- Tiap commit tidak bisa di-apply sebagai patch yang solid
28-
- Merge commit di mana2
31+
- Merge commit di mana-mana
2932

3033
---------
34+
3135
## Git Zealot
32-
#### Ciri khas :
36+
### Ciri khas:
3337
- Commit per task
34-
- Bikin branch even untuk ngerjain 1 commit doang
38+
- Bikin branch bahkan untuk ngerjain 1 commit doang
3539
- Rebase melulu
3640

37-
#### Cara kerja :
38-
- Clone project terus buat branch baru
39-
```
40-
$ git clone myrepo
41-
$ git checkout -b topic-branch
42-
```
41+
### Cara kerja:
42+
- Clone project lalu buat branch baru
43+
44+
$ git clone myrepo
45+
$ git checkout -b topic-branch
46+
4347
- Hack / rubah code
4448
- Pilih hunk yang mau distage
45-
```
46-
$ git add -i
47-
```
49+
50+
$ git add -i
51+
4852
- Commit terus Push ke branch baru yang telah dibuat
49-
```
50-
$ git commit -m "log message"
51-
$ git push origin topic-branch
52-
```
53-
- Jangan gunakan master untuk kerja, master hanya untuk track upstream.
53+
54+
$ git commit -m "log message"
55+
$ git push origin topic-branch
56+
57+
- Jangan gunakan master untuk kerja, master hanya untuk track upstream
5458
- Persiapan untuk rilis
55-
```
56-
$ git checkout master
57-
$ git remote add upstream
58-
$ git fetch upstream
59-
$ git merge master upstream/master
60-
$ git checkout topic-branch
61-
```
62-
- Pilih :
63-
- ```$ git rebase master``` (awas intermediate commit juga harus ditest)
64-
- ```$ git checkout master``` dan ```$ git merge topic-branch``` (jadi ada merge commit) -> preferred seperti katanya [nvie](http://nvie.com/posts/a-successful-git-branching-model/)
65-
- resolve conflicts
59+
60+
$ git checkout master
61+
$ git remote add upstream
62+
$ git fetch upstream
63+
$ git merge master upstream/master
64+
$ git checkout topic-branch
65+
66+
- Pilih:
67+
- `$ git rebase master` (awas intermediate commit juga harus ditest)
68+
- `$ git checkout master` dan `$ git merge topic-branch` (jadi ada merge commit) (preferred seperti katanya [nvie](http://nvie.com/posts/a-successful-git-branching-model/))
69+
- Resolve conflicts
6670
- Commit
67-
```
68-
$ git commit -m "log message"
69-
```
71+
72+
$ git commit -m "log message"
73+
7074
- Send pull request
71-
```
72-
$ git format-patch
73-
```
74-
- send untuk review/pull request
7575

76+
$ git format-patch
77+
78+
- send untuk review/pull request
7679

77-
#### Outcome :
80+
### Outcome:
7881
- Clean, linear history
7982
- Patch bisa di-apply secara clean
8083
- Tiap commit jelas urusannya

0 commit comments

Comments
 (0)