Marc,
Thank you so much for using prs for those latest commits! Please continue to do so, it makes life so much easier for people following the repo and who want to know what has changed. Also, code reviews! Plus it will make it so much easier to construct a changelog in the future, should you decide to attach one to each release (it's a good practice).
Keep'em coming!
-- vyzo
Afficher les réponses par date
Indeed, resisting the temptation to push commits directly to master is a winning move for multi-contributor repos :)
GitHub PRs correspond 1:1 to Git branches, so if you do all your work in topic branches, it's almost effortless to make a PR for each branch. The branches can come from the main repo or any fork: equally easy.
As a bonus, all popular CI services automatically run CI for each PR, so if you go via PR you're merging only tested code to master.
IIRC GitHub has some branch protection system so you can block direct commits to master. The switch is somewhere in the repo's settings.
On Nov 11, 2019, at 1:10 PM, Lassi Kortela lassi@lassi.io wrote:
Indeed, resisting the temptation to push commits directly to master is a winning move for multi-contributor repos :)
GitHub PRs correspond 1:1 to Git branches, so if you do all your work in topic branches, it's almost effortless to make a PR for each branch. The branches can come from the main repo or any fork: equally easy.
As a bonus, all popular CI services automatically run CI for each PR, so if you go via PR you're merging only tested code to master.
IIRC GitHub has some branch protection system so you can block direct commits to master. The switch is somewhere in the repo's settings.
Yes I see all the advantages now. But bad habits are hard to get rid of… I still haven’t found a painless way to do the github pull-requests from the command-line.
Could you guys share the steps that work for you? Do you use “hub”?
Marc
Could you guys share the steps that work for you? Do you use “hub”?
I just use the GitHub website. When you go to the front page for a repo where you just pushed some code, it shows a small pop-up that says "you just pushed code to branch xyz" with a "create PR" button next to it. When you click that button it takes you to a pre-filled PR creation form where you often don't need to do anything else than click OK.
"hub" is probably smarter but I find the above shortcut quite effortless. All the GitHub repos you use will be in the web browser's recently used URLs anyway, so you only need to type part of the repo's name in the address bar to go to it.
One thing I use all the time is having multiple Git remotes in a single local Git clone. You can list them:
$ git remote -v gambit git@github.com:gambit/gambit.git (fetch) gambit git@github.com:gambit/gambit.git (push) lassik git@github.com:lassik/gambit.git (fetch) lassik git@github.com:lassik/gambit.git (push) udem-dlteam git@github.com:udem-dlteam/gambit.git (fetch) udem-dlteam git@github.com:udem-dlteam/gambit.git (push)
and add new ones with `git remote add`. Usually you'd have the `origin` remote be the one where you normally push new topic branches, and `upstream` be the official repo where they are integrated. But the names are for your local convenience and don't affect any public activity.
Having only one clone of each repo is easier to keep track of than multiple clones. And it's easy to diff and move branches between clones. `git fetch --all --tags` fetches the changes from all remotes at once (without touching any of your local branches) so it's easy to stay up to date with multiple remote repos.
For Emacs, Magit (https://melpa.org/#/magit) is extremely useful. It provides single-letter commands, syntax coloring and other convenience for most Git functions. It's quite hard to learn but saves tons of time on a daily basis.
I also use the github website. Note that when you do your initial branch push, it displays a message in the command line that gives you the URL to open the new pr.
-- vyzo
On Mon, Nov 11, 2019 at 8:20 PM Lassi Kortela lassi@lassi.io wrote:
Could you guys share the steps that work for you? Do you use “hub”?
I just use the GitHub website. When you go to the front page for a repo where you just pushed some code, it shows a small pop-up that says "you just pushed code to branch xyz" with a "create PR" button next to it. When you click that button it takes you to a pre-filled PR creation form where you often don't need to do anything else than click OK.
"hub" is probably smarter but I find the above shortcut quite effortless. All the GitHub repos you use will be in the web browser's recently used URLs anyway, so you only need to type part of the repo's name in the address bar to go to it.
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list
There is a pip package called git-pull-request. Also the ruby gem ghi should also provide it. So a 'pip install git-pull-request' should allow 'git pull-request' to work from the repo directory
Sent from ProtonMail mobile
-------- Original Message -------- On Nov 11, 2019, 10:13 AM, Marc Feeley wrote:
On Nov 11, 2019, at 1:10 PM, Lassi Kortela lassi@lassi.io wrote:
Indeed, resisting the temptation to push commits directly to master is a winning move for multi-contributor repos :)
GitHub PRs correspond 1:1 to Git branches, so if you do all your work in topic branches, it's almost effortless to make a PR for each branch. The branches can come from the main repo or any fork: equally easy.
As a bonus, all popular CI services automatically run CI for each PR, so if you go via PR you're merging only tested code to master.
IIRC GitHub has some branch protection system so you can block direct commits to master. The switch is somewhere in the repo's settings.
Yes I see all the advantages now. But bad habits are hard to get rid of… I still haven’t found a painless way to do the github pull-requests from the command-line.
Could you guys share the steps that work for you? Do you use “hub”?
Marc
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list