github PRs not rebased on master sorted by github user

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: github PRs not rebased on master sorted by github user

Post by bernd »

PrzemoF wrote: Sun Sep 26, 2021 10:37 pm If you want to register my laptop as a temporary builder for your repo please PM me the token. I have delay with getting parts for the permanent builder, so I guess we have to use what's at hand. The builds in my repo will be finished in about 30 minutes from now.
I am on the way ... I have set up a quad core i5 box which only is in use for the CI ATM. It is not a formula 1 race car, but it is ok. A overall fresch build takes around an hour. A ccached build around 6 to 8 minutes.

ATM I set up the automatically comments for the PRs. Hopefully I can set up some repo to post all the code this evening.
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: github PRs not rebased on master sorted by github user

Post by paullee »

I will see what I can do :) - Currently still using password authentication so can no longer login at the moment. And probably need to search what should be done after having submitting a PR how to rebase. BTW, those 2 PR is commented by reviewers and subject to further revisions.

Lots to learn about using git / github / git lab :D

Thanks.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: github PRs not rebased on master sorted by github user

Post by bernd »

get a token and use this token instead your password. It is easy.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: github PRs not rebased on master sorted by github user

Post by bernd »

to rebase a PR you just need to rebase the branch from your repo you made th PR with.
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: github PRs not rebased on master sorted by github user

Post by paullee »

bernd wrote: Mon Sep 27, 2021 6:25 pm to rebase a PR you just need to rebase the branch from your repo you made th PR with.
Sorry, need some help :)

I generate a PAT following - https://docs.github.com/en/authenticati ... cess-token

Update my master on my pc, and rebase the branch following - https://forum.freecadweb.org/viewtopic. ... 10#p197095

Change to the branch and want to push, then below error returns. Any idea ? Thanks !

Code: Select all

[paullee@fedora FreeCAD]$ git push origin
Username for 'https://github.com': paullee0@gmail.com
Password for 'https://paullee0@gmail.com@github.com': 
To https://github.com/paullee0/FreeCAD.git
 ! [rejected]              ArchEquipment_1_SketchArch_UpdateAttachmentObject_support -> ArchEquipment_1_SketchArch_UpdateAttachmentObject_support (non-fast-forward)
error: failed to push some refs to 'https://github.com/paullee0/FreeCAD.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
[paullee@fedora FreeCAD]$ 
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: github PRs not rebased on master sorted by github user

Post by bernd »

paullee wrote: Sun Oct 03, 2021 1:32 am Sorry, need some help :)

I generate a PAT following - https://docs.github.com/en/authenticati ... cess-token
exactly. This one you can use the same way as your password before.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: github PRs not rebased on master sorted by github user

Post by bernd »

paullee wrote: Sun Oct 03, 2021 1:32 am
bernd wrote: Mon Sep 27, 2021 6:25 pm to rebase a PR you just need to rebase the branch from your repo you made th PR with.
Sorry, need some help :)
Update my master on my pc, and rebase the branch following - https://forum.freecadweb.org/viewtopic. ... 10#p197095
Mhh could be for various reasons ...

1:
in your repository make sure your master branch has the same id as github FreeCAD master (https://github.com/FreeCAD/FreeCAD/commits/master) If this is ok your master branch is uptodate with latest FreeCAD master

2.
checkout your feature branch. The one you made the PR with. For example for PR4860 this is https://github.com/paullee0/FreeCAD/tre ... ct_support It has to be this branch! Than make sure you are on the right branch by use of "git status" Than rebase your master with "git rebase master" Than check with "git log -10 -oneline" it your feature branch of the PR is on top of official FreeCAD master.

3.
force push the feature branch to your repository by "git push -f ArchWindow_1_SketchArch_UpdateAttachmentObject_support"

hope that helps keep asking if you have problems ...
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: github PRs not rebased on master sorted by github user

Post by paullee »

bernd wrote: Thu Oct 07, 2021 6:13 pm
paullee wrote: Sun Oct 03, 2021 1:32 am Sorry, need some help :)

I generate a PAT following - https://docs.github.com/en/authenticati ... cess-token
exactly. This one you can use the same way as your password before.
Yes thanks, it seems token works.
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: github PRs not rebased on master sorted by github user

Post by paullee »

bernd wrote: Thu Oct 07, 2021 6:21 pm
paullee wrote: Sun Oct 03, 2021 1:32 am Sorry, need some help :)
Update my master on my pc, and rebase the branch following - https://forum.freecadweb.org/viewtopic. ... 10#p197095
Mhh could be for various reasons ...
...
Thanks for the details, will try following and dig out more information online if neccesary :)
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: github PRs not rebased on master sorted by github user

Post by paullee »

bernd wrote: Thu Oct 07, 2021 6:21 pm hope that helps keep asking if you have problems ...
I have not much idea what needs to be done, reading your procedures, checking stackoverflow etc., finally do below just follow git's hint, is that ok ?

Code: Select all

[paullee@fedora FreeCAD]$ git checkout ArchEquipment_1_SketchArch_UpdateAttachmentObject_support
Switched to branch 'ArchEquipment_1_SketchArch_UpdateAttachmentObject_support'
Your branch and 'origin/ArchEquipment_1_SketchArch_UpdateAttachmentObject_support' have diverged,
and have 1026 and 1 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

  
[paullee@fedora FreeCAD]$ git pull
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 3 (delta 1), reused 1 (delta 1), pack-reused 2
Unpacking objects: 100% (3/3), 11.49 KiB | 784.00 KiB/s, done.
From https://github.com/paullee0/FreeCAD
   24e472cdde..50056dca9f  ArchWall_BugFixes_14   -> origin/ArchWall_BugFixes_14
   0e81e76f7d..d90c1ff72f  Draftutils_BugFixes_01 -> origin/Draftutils_BugFixes_01
   e6b7bb18b9..232fda3faa  master                 -> origin/master
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Merge made by the 'recursive' strategy.


[paullee@fedora FreeCAD]$ git push origin
Username for 'https://github.com': paullee0@gmail.com
Password for 'https://paullee0@gmail.com@github.com': 
Enumerating objects: 14, done.
Counting objects: 100% (14/14), done.
Delta compression using up to 4 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 926 bytes | 926.00 KiB/s, done.
Total 6 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To https://github.com/paullee0/FreeCAD.git
   4d816f35bb..49ecd1b1b6  ArchEquipment_1_SketchArch_UpdateAttachmentObject_support -> ArchEquipment_1_SketchArch_UpdateAttachmentObject_support
[paullee@fedora FreeCAD]$ 


Post Reply