File: 07-Creating-a-pull-request.md

package info (click to toggle)
gcli 2.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,476 kB
  • sloc: ansic: 25,411; sh: 580; makefile: 509; yacc: 261; lex: 59
file content (56 lines) | stat: -rw-r--r-- 1,345 bytes parent folder | download
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
# Creating a pull request

Creating a pull request with gcli is usually as simple as running

	$ gcli pulls create

## Preparation

Suppose you have a git repository forked and cloned:

	$ git clone git@github.com:contour-terminal/contour
	$ cd contour
	$ gcli forks create --into herrhotzenplotz

Then you do some work on whatever feature you're planning to submit:

	$ git checkout -b my-amazing-feature
	<hackhackhack>
	$ git add -p
	$ git commit

## Push your changes

You then push your changes to your fork:

	$ git push origin my-amazing-feature

## Create the pull request

Now you can run the command to create the pull request:

	$ gcli pulls create
	From (owner:branch) [herrhotzenplotz:my-amazing-feature]:
	Owner [contour-terminal]:
	Repository [contour]:
	To Branch [master]:
	Title: Add new amazing feature
	Enable automerge? [yN]:

Most of the defaults you should be able to simply accept. This
assumes that you have the source branch checked out locally and
remotes are configured appropriately.

Otherwise you can just change the defaults by entering the correct
values.

## Enter original post

After you entered all the meta data of the pull request gcli will
drop you into your editor and lets you enter a message for the pull
request.

## Submit

After you saved and exit type `y` and hit enter to submit the pull
request.