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
It is important that you create a new branch to make changes on and that you do not change the `master` branch (other than to rebase in changes from `upstream/master`). In this example I will assume you will be making your changes to a branch called `feature_x`. This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the JPaseto project.
33
+
It is important that you create a new branch to make changes on and that you do not change the `main` branch (other than to rebase in changes from `upstream/main`). In this example I will assume you will be making your changes to a branch called `feature_x`. This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the JPaseto project.
34
34
35
35
It is best practice to create a new branch each time you want to contribute to the project and only track the changes for that pull request in this branch.
36
36
@@ -45,37 +45,37 @@ $ git commit -a -m "descriptive commit message for your changes"
45
45
> The `-b` specifies that you want to create a new branch called `feature_x`. You only specify `-b` the first time you checkout because you are creating a new branch. Once the `feature_x` branch exists, you can later switch to it with only `git checkout feature_x`.
46
46
47
47
48
-
Rebase `feature_x` to include updates from `upstream/master`
48
+
Rebase `feature_x` to include updates from `upstream/main`
It is important that you maintain an up-to-date `master` branch in your local repository. This is done by rebasing in the code changes from `upstream/master` (the official JPaseto project repository) into your local repository. You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. I recommend you do this process periodically while you work to make sure you are working off the most recent project code.
51
+
It is important that you maintain an up-to-date `main` branch in your local repository. This is done by rebasing in the code changes from `upstream/main` (the official JPaseto project repository) into your local repository. You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. I recommend you do this process periodically while you work to make sure you are working off the most recent project code.
52
52
53
53
This process will do the following:
54
54
55
-
1. Checkout your local `master` branch
56
-
2. Synchronize your local `master` branch with the `upstream/master` so you have all the latest changes from the project
55
+
1. Checkout your local `main` branch
56
+
2. Synchronize your local `main` branch with the `upstream/main` so you have all the latest changes from the project
57
57
3. Rebase the latest project code into your `feature_x` branch so it is up-to-date with the upstream code
58
58
59
59
```bash
60
-
$ git checkout master
60
+
$ git checkout main
61
61
$ git fetch upstream
62
-
$ git rebase upstream/master
62
+
$ git rebase upstream/main
63
63
$ git checkout feature_x
64
-
$ git rebase master
64
+
$ git rebase main
65
65
```
66
66
67
-
> Now your `feature_x` branch is up-to-date with all the code in `upstream/master`.
67
+
> Now your `feature_x` branch is up-to-date with all the code in `upstream/main`.
68
68
69
69
70
70
Make a GitHub Pull Request to contribute your changes
When you are happy with your changes and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is `origin`) and then initiating a pull request on GitHub.
74
74
75
-
> **IMPORTANT:** Make sure you have rebased your `feature_x` branch to include the latest code from `upstream/master`_before_ you do this.
75
+
> **IMPORTANT:** Make sure you have rebased your `feature_x` branch to include the latest code from `upstream/main`_before_ you do this.
76
76
77
77
```bash
78
-
$ git push origin master
78
+
$ git push origin main
79
79
$ git push origin feature_x
80
80
```
81
81
@@ -85,7 +85,7 @@ To initiate the pull request, do the following:
85
85
86
86
1. In your browser, navigate to your forked repository: [https://github.com/YOUR_ACCOUNT/jpaseto](https://github.com/YOUR_ACCOUNT/jpaseto)
87
87
2. Click the new button called '**Compare & pull request**' that showed up just above the main area in your forked repository
88
-
3. Validate the pull request will be into the upstream `master` and will be from your `feature_x` branch
88
+
3. Validate the pull request will be into the upstream `main` and will be from your `feature_x` branch
89
89
4. Enter a detailed description of the work you have done and then click '**Send pull request**'
90
90
91
91
If you are requested to make modifications to your proposed changes, make the changes locally on your `feature_x` branch, re-push the `feature_x` branch to your fork. The existing pull request should automatically pick up the change and update accordingly.
@@ -94,14 +94,14 @@ If you are requested to make modifications to your proposed changes, make the ch
94
94
Cleaning up after a successful pull request
95
95
-------------------------------------------
96
96
97
-
Once the `feature_x` branch has been committed into the `upstream/master` branch, your local `feature_x` branch and the `origin/feature_x` branch are no longer needed. If you want to make additional changes, restart the process with a new branch.
97
+
Once the `feature_x` branch has been committed into the `upstream/main` branch, your local `feature_x` branch and the `origin/feature_x` branch are no longer needed. If you want to make additional changes, restart the process with a new branch.
98
98
99
-
> **IMPORTANT:** Make sure that your changes are in `upstream/master` before you delete your `feature_x` and `origin/feature_x` branches!
99
+
> **IMPORTANT:** Make sure that your changes are in `upstream/main` before you delete your `feature_x` and `origin/feature_x` branches!
100
100
101
101
You can delete these deprecated branches with the following:
0 commit comments