Skip to content

Commit ad7a7a7

Browse files
committed
doc: document the git command
1 parent 7042403 commit ad7a7a7

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ CLI tools for Node.js Core collaborators.
1313
- [Install](#install)
1414
- [Setting up credentials](#setting-up-credentials)
1515
- [`ncu-config`](#ncu-config)
16+
- [`git-node`](#git-node)
17+
- [Prerequistes](#prerequistes)
18+
- [Demo & Usage](#demo--usage)
1619
- [`get-metadata`](#get-metadata)
1720
- [Git bash for Windows](#git-bash-for-windows)
1821
- [Features](#features)
@@ -85,6 +88,48 @@ Options:
8588
--global [boolean] [default: false]
8689
```
8790

91+
## `git-node`
92+
93+
A custom Git command for landing pull requests. You can run it as
94+
`git-node` or `git node`. To see the help text, run `git node help`.
95+
96+
### Prerequistes
97+
98+
1. It's a Git command, so make sure you have Git installed, of course.
99+
2. Install [core-validate-commit](https://github.com/nodejs/core-validate-commit)
100+
101+
```
102+
$ npm install -g core-validate-commit
103+
```
104+
3. Configure your upstream remote and branch name. By default it assumes your
105+
remote pointing to https://github.com/nodejs/node is called `upstream`, and
106+
the branch that you are trying to land PRs on is `master`. If that's not the
107+
case:
108+
109+
```
110+
$ cd path/to/node/project
111+
$ ncu-config upstream your-remote-name
112+
$ ncu-config branch your-branch-name
113+
```
114+
115+
### Demo & Usage
116+
117+
1. Landing multiple commits: https://asciinema.org/a/148627
118+
2. Landing one commit: https://asciinema.org/a/157445
119+
120+
```
121+
$ cd path/to/node/project
122+
$ git node land --abort # Abort a landing session, just in case
123+
$ git node land $PRID # Start a new landing session
124+
125+
$ git rebase -i upstream/master # Put `edit` on every commit that's gonna stay
126+
127+
$ git node land --amend # Regenerate commit messages in HEAD
128+
$ git rebase --continue # Repeat until the rebase is done
129+
130+
$ git node land --final # Verify all the commit messages
131+
```
132+
88133
## `get-metadata`
89134
90135
This tool is inspired by Evan Lucas's [node-review](https://github.com/evanlucas/node-review),

0 commit comments

Comments
 (0)