Skip to content

Commit 7aa361f

Browse files
authored
Merge pull request #586 from wp-cli/copilot/remove-hub-requirement
2 parents dd15ee9 + 33947f7 commit 7aa361f

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

contributions/pull-requests.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ If you haven't submitted a pull request before, you'll want to install WP-CLI fo
5656

5757
### Working on a specific command/package
5858

59-
1. Install [Composer](https://getcomposer.org/) and [hub](https://hub.github.com/) if you don't already have them.
60-
2. Clone the git repository of the command/package you want to work on to your local machine. As an example for working on the `wp core` command: `hub clone wp-cli/core-command`
61-
3. Change into the cloned directory and fork WP-CLI: `cd core-command`.
59+
1. Install [Composer](https://getcomposer.org/) if you don't already have it.
60+
2. Clone the git repository of the command/package you want to work on to your local machine. As an example for working on the `wp core` command: `git clone https://github.com/wp-cli/core-command.git`
61+
3. Change into the cloned directory: `cd core-command`
6262
4. Install all Composer dependencies: `composer install`
6363
5. Verify WP-CLI was installed properly: `vendor/bin/wp --info`
6464

6565
Within this package, you should preferably use `vendor/bin/wp` to run the command. Just using `wp` should work as well, but by doing that you might run the command through a different version of the framework and thus getting an unexpected result.
6666

6767
### Working on the project as a whole
6868

69-
1. Install [Composer](https://getcomposer.org/) and [hub](https://hub.github.com/) if you don't already have them.
69+
1. Install [Composer](https://getcomposer.org/) if you don't already have it.
7070
2. Clone the WP-CLI git repository to your local machine: `git clone [email protected]:wp-cli/wp-cli.git ~/wp-cli`
71-
3. Change into the cloned directory and fork WP-CLI: `cd ~/wp-cli`. If you are going to work on the core framework itself, run `hub fork` here to create a pushable repository on GitHub.
71+
3. Change into the cloned directory: `cd ~/wp-cli`. If you are going to work on the core framework itself, [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) on GitHub through the web UI and [add it as a remote](https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories#adding-a-remote-repository): `git remote add fork [email protected]:yourusername/wp-cli.git`
7272
4. Install all Composer dependencies: `composer install --prefer-source`
7373
5. Alias the `wp` command to your new WP-CLI install: `alias wp='~/wp-cli/bin/wp'`
7474
6. Verify WP-CLI was installed properly: `wp --info`
@@ -77,19 +77,22 @@ Commands bundled with WP-CLI (e.g. `wp scaffold plugin`) will be editable from t
7777

7878
Commands available for standalone installation (e.g. `wp dist-archive`) can be installed from source (e.g. `wp package install [email protected]:wp-cli/dist-archive-command.git`). Run `wp package path <package-name>` to find the appropriate directory to edit.
7979

80-
Importantly, you'll need to fork each repository in order to have an `origin` to push to. Run `hub fork` to fork a repository from the command-line:
80+
Importantly, you'll need to fork each repository in order to have a remote to push to. For each repository you want to contribute to:
81+
82+
1. [Fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) on GitHub through the web UI
83+
2. [Add your fork as a remote](https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories#adding-a-remote-repository):
8184

8285
$ cd vendor/wp-cli/scaffold-command
83-
$ hub fork
84-
Updating danielbachhuber
85-
From https://github.com/wp-cli/scaffold-command
86-
* [new branch] master -> danielbachhuber/master
87-
new remote: danielbachhuber
86+
$ git remote add fork [email protected]:yourusername/scaffold-command.git
8887
$ git remote -v
89-
danielbachhuber [email protected]:danielbachhuber/scaffold-command.git (fetch)
90-
danielbachhuber [email protected]:danielbachhuber/scaffold-command.git (push)
88+
origin https://github.com/wp-cli/scaffold-command.git (fetch)
89+
origin https://github.com/wp-cli/scaffold-command.git (push)
90+
fork [email protected]:yourusername/scaffold-command.git (fetch)
91+
fork [email protected]:yourusername/scaffold-command.git (push)
92+
93+
Once you've done so, you'll have a fork in your GitHub account and a new remote you can push to. You can then push changes to your fork with `git push fork branch-name`.
9194

92-
Once you've done so, you'll have a fork in your GitHub account and new remote you can push to. If you didn't install `hub`, you'll need to fork the target repo through the web UI and manually add your fork as a remote.
95+
**Optional:** The [GitHub CLI (`gh`)](https://cli.github.com/) can help streamline some of these tasks, such as forking repositories and creating pull requests from the command line.
9396

9497
## Running and writing tests
9598

0 commit comments

Comments
 (0)