You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributions/pull-requests.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,19 +56,19 @@ If you haven't submitted a pull request before, you'll want to install WP-CLI fo
56
56
57
57
### Working on a specific command/package
58
58
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`
62
62
4. Install all Composer dependencies: `composer install`
63
63
5. Verify WP-CLI was installed properly: `vendor/bin/wp --info`
64
64
65
65
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.
66
66
67
67
### Working on the project as a whole
68
68
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.
70
70
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`
72
72
4. Install all Composer dependencies: `composer install --prefer-source`
73
73
5. Alias the `wp` command to your new WP-CLI install: `alias wp='~/wp-cli/bin/wp'`
74
74
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
77
77
78
78
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.
79
79
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):
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`.
91
94
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.
0 commit comments