You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/01/10 19:07:52 UTC
[GitHub] [netbeans] matthiasblaesing commented on pull request #3074: [NETBEANS-189] Updates for Sql autocomplete
matthiasblaesing commented on pull request #3074:
URL: https://github.com/apache/netbeans/pull/3074#issuecomment-1009254296
If you look at the branch I referenced I have squashed your two commits into one (https://github.com/matthiasblaesing/netbeans/commit/5288810a8642ec08bbd0d5d4c7b92567440d2549). In that commit you see, that you are referenced as the author and I'm referenced as the committer, which is correct for this case.
To get this PR onto the current master state, this is what I would do:
1. Ensure your own repository is registered as a remote with the name `origin`
2. Ensure the apache netbeans repository is registered as a remove with the name `github`
That will result in this (adapt the names for you):
```
matthias@enterprise:~/src/netbeans$ git remote -v
github git@github.com:apache/netbeans.git (fetch)
github git@github.com:apache/netbeans.git (push)
origin git@github.com:matthiasblaesing/netbeans.git (fetch)
origin git@github.com:matthiasblaesing/netbeans.git (push)
matthias@enterprise:~/src/netbeans$
```
3. Update your local copy of the master branch `git fetch github`
4. Fetch my branch:
```bash
# Checkout the base commit of my branch (this is where my branch an master diverge)
git checkout -b blaesing-sql_autocomplete_clean f6634f96135ccd5aeae12c68e3f17d4bba268419
# Pull the commits from my branch into the freshly created branch
git pull https://github.com/matthiasblaesing/netbeans.git pr-3074
```
5. Checkout your work branch `git checkout sql_autocomplete_clean`
6. Rebase it onto current master by running `git rebase github/master`
7. To squash the last two commits together, run `git rebase -i HEAD~2`. An editor window will open, where the two commits will be shown and where you can now change history (literally). The comment below the history gives info what you can do. You want to change `pick` in the second line to `f` (short for fixup). This will squash the second commit into the first and only the commit message of the first commit will be retained. Save and exit the editor.
8. git will now tell you, that the rebase was successful
At this point the changes from this PR are on on top of the current state of master and squashed into a single commit.
9. Find the commit ID of my commit by running `git log -n 5 --oneline blaesing-sql_autocomplete_clean` (show the last 5 commits from my branch, the first is the right one)
10. Cherry pick that commit into your branch `git cherry-pick c5173486d454`
11. This introduces a merge conflict in `ide/db/apichanges.xml` and `ide/db/nbproject/project.properties`. Open the `apichanges.xml` file, move the new entry to the top and fix the XML structure, save and exit the editor. Please also change the minor version of the change to 83. For the `ide/db/nbproject/project.properties` retain the newer spec version.
12. Mark the conflicts as fixed: `git add ide/db/apichanges.xml ide/db/nbproject/project.properties`
13. Finish cherry-picking: `git cherry-pick --continue`
Now check the result for example using `gitk` or `git log -n 3`. The latter should show the first commit to be authored by me, the second by you and the third should show the commit of current master.
Now you need to do a forced push to update this PR:
14. Run: `git push -f`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists