GitHub Actions' default "Post Check out Git repository" job: What does it do?

Viewed 461

My GitHub Actions all have the same penultimate step added by default:

Post Check out Git repository
--- 
Post job cleanup.
$> /usr/bin/git version
git version 2.32.0
$> /usr/bin/git config --local --name-only --get-regexp core\.sshCommand
$> /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
$> /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
$> /usr/bin/git config --local --unset-all http.https://github.com/.extraheader
$> /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :

What do those git commands do and why do they run after a GitHub Action Workflow completes? Since the GitHub Action executes in a container or VM I thought it could simply be "town down" at the end without requiring explicit cleanup.

I am just curious about the what and the why behind this bit of code that runs every time my GitHub Action executes.

0 Answers
Related