Web lists-archives.com

.git/config validations by (for silly errors) by git fsck


I added manually a remote to .git/config, but updated only the url= line, forgetting to update the fetch= line.  So two
remotes had
  fetch = +refs/heads/*:refs/remotes/origin/*

and fetching from the one or the other has overwritten origin/master.  git fsck has not helped.

Please introduce a check in git fcsk that triggers, when two different remotes share the same fetch line, or if the
fetch line does not reference the remote name.