Post

43 The typical pull request workflow on GitHub

43 The typical pull request workflow on GitHub

Command

1
$ git clone https://github.com/artwalker/rearrange.git

Code output:

1
2
3
4
5
6
7
8
9
10
11
Cloning into 'rearrange'...

remote: Enumerating objects: 9, done.

remote: Counting objects: 100% (9/9), done.

remote: Compressing objects: 100% (7/7), done.

remote: Total 9 (delta 1), reused 9 (delta 1), pack-reused 0

Unpacking objects: 100% (9/9), done.

Command

1
2
$ cd rearrange
$ ls -l

Code output:

1
2
3
4
5
6
7
total 20

-rw-rw-r-- 1 user user 11357 Jan 7 09:42 LICENSE

-rw-rw-r-- 1 user user   211 Jan 7 09:42 rearrange.py

-rw-rw-r-- 1 user user   762 Jan 7 09:42 rearrange_test.py

Command

1
$ git log

Code output:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
commit 367a127672c40a163a6f05ad930f2b0b857dc961  (HEAD -> master, origin/master, origin/HEAD)

Author: Blue Kale <bluekale@example.com>

Date:   Mon Jul 29 21:21:53 2019 +0200

    Add tests for the rearrange module

commit c89805e52a1afa143c503f946cc5ead0fdd20255

Author: Blue Kale <bluekale@example.com>

Date:   Mon Jul 29 21:20:57 2019 +0200

    Add the rearrange module

commit f4ddbc7a0ca3ac83a7e9ce7030e774b58e5dda42

Author: Blue Kale <53440916+blue-kale@users.noreply.github.com>

Date:   Mon Jul 29 16:07:42 2019 -0300

    Initial commit

Command

1
$ git checkout -b add-readme

Code output:

1
Switched to a new branch 'add-readme'

Command

1
$ vim README.md

Modify file:

1
2
3
4
Rearrange
=========

This module is used for rearranging names.

Command

1
2
$ git add README.md
$ git commit -m 'Add a simple README.md file'

Code output:

1
2
3
4
5
[master 736d754] Add a simple README.md file

 1 file changed, 4 insertions(+)

 create mode 100644 README.md

Command

1
$ git push -u origin add-readme

Code output:

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
Username for 'https://github.com': artwalker

Password for 'https://artwalker@github.com': 

Enumerating objects: 4, done.

Counting objects: 100% (4/4), done.

Delta compression using up to 4 threads

Compressing objects: 100% (3/3), done.

Writing objects: 100% (3/3), 400 bytes | 400.00 KiB/s, done.

Total 3 (delta 0), reused 0 (delta 0)

remote: 

remote: Create a pull request for 'add-readme' on GitHub by visiting:

remote:      https://github.com/artwalker/rearrange/pull/new/add-readme

remote: 

To https://github.com/artwalker/rearrange.git

 * [new branch]      add-readme -> add-readme

Branch 'add-readme' set up to track remote branch 'add-readme' from 'origin'.
This post is licensed under CC BY 4.0 by the author.