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/07 13:26:16 UTC
[GitHub] [netbeans] matthiasblaesing edited a comment on pull request #3423: [cnd] small-2.1 Merging from master
matthiasblaesing edited a comment on pull request #3423:
URL: https://github.com/apache/netbeans/pull/3423#issuecomment-1007405616
I agree with the idea, but this PR is broken, as it is _not_ a merge commit. I don't know how this commit was created, but this would be my approach:
```bash
# Switch to master branch
git checkout master
# Remove current broken branch
git branch -D feature/cnd-small-2-bis
# Update github checkup (depends on the name of the remote, that holds the upstream branches)
git fetch github
# Checkout CND into the new feature branch
git checkout -b feature/cnd-small-2-bis github/cnd
# Merge master into the new branch
git merge github/master
# The merge can't be done automatically, as the two branches have conflicting change.
# Fix merge conflict in nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ignored-overlaps:
# The version from master is correct (the one with the added overlab ignores)
vim nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ignored-overlaps
git add nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ignored-overlaps
# Commit the merge
git commit
# Now you are in branch feature/cnd-small-2-bis
```
After this you are in the `feature/cnd-small-2-bis` branch and that branch holds the merge commit of CND and master. Creating a PR against the CND branch from that should to the trick.
If you look at the git log, you see the difference in the parents. The graphical version (using `gitk feature/cnd-small-2-bis` and `gitk github/pr/3423`):
This PR:

The suggested way with a merge:

In the first screenshot the commit only has a single parent (CND) and so all changes are be part of that commit and don't come from history. That should not be the case, we loose history this way.
Maybe this illustrates my idea better?
--
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