I/we need a lesson in git and/or gitlab and/or merge requests
James Browning
jamesb192 at jamesb192.com
Sat Nov 11 12:56:33 UTC 2023
Hal Murray wrote:
>
> Merge requests seem reasonable if all goes well. My work flow is roughly:
> download the patch (URL plus ".patch")
> scan it
> maybe apply and test
> approve and merge
Ah, my work turbulence is incompatible with your workflow.
> But things go downhill if I don't like something. What I get from James is an
> update to the MR, a patch to the patch. That makes reading/checking the patch
> harder and clutters up the git log.
>
> What if I don't like the description of a patch?
>
> Merge has an option to reduce all the patches to one. But often that isn't
> appropriate.
"git rebase -i" allows you to selectively drop, reorder, squash,
and/or amend commits. At least, that is what I have heard. I use
GUI tools.
> git works so well for most things. I think I/we are missing something in the
> workflow.
Reasonable communication, etiquette, and politics on my part?
> Should we be throwing away merges and making new ones rather than patching
> them?
Yes, if it works better than my work-turbulence not working with
your workflow. We will not run out of integers.
> How do I backup a bunch of commits that turned into a MR so I can make them
> better and try again?
>
> I'm on a list or two where patches are distributed via email. git has several
> commands for that. Iterations usually have a v1 v2 ... as part of the
> Subject. Often individual parts will be approved. It's a lof of clutter in
> the email stream but the discussion gets archived in email rather than hidden
> over in a MR.
>
> Is there a way in gitlab to approve only one of the patches rather than all of
> them? I think I could do that by downloading the patch which is several email
> messages, editing out the one I want... Again, if that was the right thing to
> be doing, I'd expect git to support it which it probably does if you use their
> email mode.
I am unaware of many things, including any potential means of
cherry-picking any particular commits via GitLab. Offline, I might
try the following.
$ git checkout origin/master
$ git am ${path_to_mr_patches}
$ git format-patch ${number_of_commits}
$ git checkout origin/master
$ $EDITOR ${specific_patch_file}
$ git am ${specific_patch_file}
Should I return to throwing patches at people and see what gets
picked up?
-30-
More information about the devel
mailing list