Skip to content

Update section on system and global configuration of Git#201

Open
alex-ball wants to merge 5 commits intoLibraryCarpentry:mainfrom
alex-ball:patch-164
Open

Update section on system and global configuration of Git#201
alex-ball wants to merge 5 commits intoLibraryCarpentry:mainfrom
alex-ball:patch-164

Conversation

@alex-ball
Copy link
Contributor

Closes #164.

In episode 2, learners are asked to inspect their current Git configuration with git config --list. This re-formats and concatenates the contents of the system gitconfig and the user's global gitconfig (and then any repo- or folder-specific gitconfig files that apply).

As research for this, I looked at a recent installation of Git on a macOS system, and also performed fresh installations on Windows following the instructions for installing the shell as of 2026-02-25.

  • I have updated the macOS output to reflect the contents of the system config that was installed at /Library/Developer/CommandLineTools/usr/share/git-core/gitconfig.

  • I have updated the Windows output to reflect the contents of the system config at C:\Program Files\Git\etc\gitconfig following the above instructions with the Git for Windows v2.53.0 installer. In relation to issue Do we need to set branch name to main?  #164, note that the instructions say "Let Git decide" on the default branch name, which sets init.defaultbranch=master (reflecting Git's internal default).

  • The fresh installation of Ubuntu (24.04 LTS) on WSL 2 did not ship with a system gitconfig. This reflects my experience with regular installations of Ubuntu and other distributions based on it. Because of this, git config --list yields no output; I have added a paragraph to reflect this.

  • The instructions for installing Git for Windows include selecting Nano as the core.editor in the system config. I am unhappy about telling people who have done this to select it again. I have therefore expanded the callout about text editors to include a discussion of the relative merits of Nano and Vim, and mention that Nano may already be set as default. The comment about cross-platform availability sits better there. I have allowed some repetition of points made before the callout (about Vim being hard at first) and after (about Nano running in the shell) – I think the discussion inside the callout would be incomplete without those points, and those who skip the callout still need to see them – but I'm open to persuasion on that point.

  • Finally, I have changed the emphasis of the part about the default branch from setting it to ensuring it, acknowledging that it may already be set to main. I have also added a callout explaining why repeating the setting in your own global config could nevertheless be useful.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/LibraryCarpentry/lc-git/compare/md-outputs..md-outputs-PR-201

The following changes were observed in the rendered markdown documents:

 02-getting-started.md | 38 +++++++++++++++++++++++++-------------
 md5sum.txt            |  2 +-
 2 files changed, 26 insertions(+), 14 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2026-03-06 11:33:43 +0000

github-actions bot pushed a commit that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do we need to set branch name to main?

2 participants