Remove SourceTree references (https://github.com/microsoft/react-native-windows-samples/issues/95#event-5702132400)
Родитель
12fd99e91e
Коммит
6dffad3f9b
26
Home.md
26
Home.md
|
@ -1,17 +1,12 @@
|
||||||
# Contributing to Microsoft/react-native-windows
|
# Contributing to Microsoft/react-native-windows
|
||||||
|
|
||||||
If this is your first time, below are some more detailed steps for getting your branch set up and submitting a PR. You can either do this with the command prompt or with a combination of the command prompt and SourceTree.
|
If this is your first time, below are some more detailed steps for getting your branch set up and submitting a PR.
|
||||||
|
|
||||||
### Setting up your branch for changes
|
### Setting up your branch for changes
|
||||||
|
|
||||||
For each bug or task you complete, it is recommended that you start with a fresh branch. If you have any lingering changes in your current branch that you want to save, go ahead and commit them. If you are just beginning, then you are good to go. On github, navigate to your repository which should be forked from Microsoft/react-native-windows. If you haven't already created a fork, follow the steps in **[Git branch Setup](https://github.com/Microsoft/react-native-windows/wiki/Setup)**. Above the list of files is a dropdown that should say master. Use the dropdown to create a new branch and name is according to what you will be working on. (I.e. DropdownHighlight, CleanUpExamples, etc). Now you have created a new branch.
|
For each bug or task you complete, it is recommended that you start with a fresh branch. If you have any lingering changes in your current branch that you want to save, go ahead and commit them. If you are just beginning, then you are good to go. On github, navigate to your repository which should be forked from Microsoft/react-native-windows. If you haven't already created a fork, follow the steps in **[Git branch Setup](https://github.com/Microsoft/react-native-windows/wiki/Setup)**. Above the list of files is a dropdown that should say master. Use the dropdown to create a new branch and name is according to what you will be working on. (I.e. DropdownHighlight, CleanUpExamples, etc). Now you have created a new branch.
|
||||||
|
|
||||||
**SourceTree:**
|
When using the command line, you will want to make sure you have your branch locally. It takes time for it to show up automatically, so you can make it show by running `git remote update origin –prune` in your command prompt from the root. Run `git branch -a` to see if your new branch shows up. Now you will want to check out your branch locally. You can do this with `git checkout -b branch-name`. Confirm you are now working out of the branch with `git branch`.
|
||||||
If you are using SourceTree you will want your branch to show up in SourceTree so you can commit changes to your branch. It takes time for it to show up automatically, so you can make it show by running `git remote update origin –prune` in your command prompt from the root. Once you see your new branch in SourceTree under Remotes on the left navigation pane, double click on your branch to check it out locally. A dialog will come up and the default settings should be fine, click Ok.
|
|
||||||
|
|
||||||
**Git Command Line**
|
|
||||||
If you are using the command line, you will want to make sure you have your branch locally. It takes time for it to show up automatically, so you can make it show by running `git remote update origin –prune` in your command prompt from the root. Run `git branch -a` to see if your new branch shows up. Now you will want to check out your branch locally. You can do this with `git checkout -b branch-name`. Confirm you are now working out of the branch with `git branch`.
|
|
||||||
|
|
||||||
|
|
||||||
### Make the fix
|
### Make the fix
|
||||||
Now that your branch is set up and ready for commits, go ahead and fix the bug you are working on or make some small change that you want to check in.
|
Now that your branch is set up and ready for commits, go ahead and fix the bug you are working on or make some small change that you want to check in.
|
||||||
|
@ -21,26 +16,17 @@ Manually test your fix, and ensure that all tests are in a good state
|
||||||
|
|
||||||
### Commit your changes
|
### Commit your changes
|
||||||
|
|
||||||
**SourceTree:**
|
To stage files using the command line, you need to run `git add <filename>` for each file. You can also look up how to add all files with changes under a directory. Next you will want to commit changes with `git commit –m "This change updates the padding in the dropdown"`
|
||||||
In SourceTree, click on commit in the top left. This won't actually do anything to your files, it will just change to show the commit UI. In the bottom container, stage all of the files you want to submit by selecting them and clicking "Stage". Add a short message in the textbox at the bottom on what is included in your change. This will not show as your entire submission text, just for this commit.
|
|
||||||
|
|
||||||
**Git Command Line**
|
|
||||||
To stage files using the command line, you need to run `git add MyFileOne.tsx` for each file. You can also look up how to add all files with changes under a directory. Next you will want to commit changes with `git commit –m "This change updates the padding in the dropdown"`
|
|
||||||
|
|
||||||
You can commit multiple times until you are ready to make a pull request. You should keep the message short since it will not be used in the bug notes and is just for keeping track of the multiple commits in one pull request.
|
You can commit multiple times until you are ready to make a pull request. You should keep the message short since it will not be used in the bug notes and is just for keeping track of the multiple commits in one pull request.
|
||||||
|
|
||||||
### Creating a Pull Request
|
### Creating a Pull Request
|
||||||
|
|
||||||
**SourceTree:**
|
Run `git push` in your command line.
|
||||||
In SourceTree click Push.
|
|
||||||
|
|
||||||
**Git Command Line**
|
This will push any staged files you have in your branch.
|
||||||
Run `git push`.
|
|
||||||
|
|
||||||
This will push any staged files your have in your branch.
|
|
||||||
|
|
||||||
Now go back to your fork on github. You should see a yellow bar at the top with your change and a button that says "Compare & Pull Request". Click that button.
|
Now go back to your fork on GitHub. You should see a yellow bar at the top with your change and a button that says "Compare & Pull Request". Click that button.
|
||||||
|
|
||||||
|
|
||||||
Click "Create Pull Request".
|
Click "Create Pull Request".
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче