The welcome page for a new empty project (without README) give commands to configure one's identity using git config. However these instructions are only provided using the --global flag, potentially replacing the user's configured identities for other projects on the same machine.
A proposition for a fix would be to add a dropdown allowing users to switch the view between global and local options, alongside an explanation text stating the difference, and potentially a link to the git config doc.
Hi @psjakubowska, thanks for your insights. I started working on this and wanted to change this block to 2 blocks (one with the --local flag, and one with the --global one), then I realized that it would be nice to reorganize this page hierarchy, as you just suggested in #469506 (closed). We can work on these two issues in parallel to determine what is the best outcome for this.
I missed #27206 when creating these issues. FYI I created #469513 (closed) with @slejeune to keep track of changes we wanted to make to the empty project welcome page. If there are other issues mentioning changes to the empty project page, you can add them here, we'd be glad to hear about them.
I agree adding a documentation link is a good thing, but I really believe that both git config blocks should be available. There is a big gain available here for developers, especially since #469486 (closed) have been resolved, to be able to quickly copy and paste the exact good command without having to type them or change a flag. But if there is a choice to make, I'll go with your proposition, because it is the most used one and the git default.
In hindsight a dropdown may not be the best choice. Maybe proposing the 2 blocks one after another is the simplest solution. Or adding a toggle (see below) to the page to change between local and global views. From my developer POW it really amounts to have the less clicks possible and to be able to copy-paste exact commands that are frequently used. I suppose that adding documentation at the beginning of the page allows someone that does not know how to proceed to be quickly redirected to documentation, while people who know what they want can just copy paste the good blocks and get going. I'm not an UX expert though, so happy to hear your thoughts on this.
100%! Though I think that if we go with the tabs for the section below, that tabs for this might be a better choice than a dropdown or a toggle. My thinking is that expecting a similar interaction from the user, makes it more predictable, ergo a better design.
So for the sake of transparency, we would use something like: