code: func (s *Action) GitCredentialGet(ctx context.Context, c *cli.Context) error {
  	ctx = sub.WithAutoSync(ctx, false)
  	cred, err := parseGitCredentials(termio.Stdin)
  	if err != nil {
  		return ExitError(ctx, ExitUnsupported, err, "Error: %v while parsing git-credential", err)
  	}
  	// try git/host/username... If username is empty, simply try git/host
  	path := "git/" + fsutil.CleanFilename(cred.Host) + "/" + fsutil.CleanFilename(cred.Username)
  	if !s.Store.Exists(ctx, path) {
  		// if the looked up path is a directory with only one entry (e.g. one user per host), take the subentry instead
  		if !s.Store.IsDir(ctx, path) {
  			return nil
  		}
  		tree, err := s.Store.Tree(ctx)
  		if err != nil {
  			return ExitError(ctx, ExitDecrypt, err, "Error: %v while listing the storage", err)
  		}
  		sub, err := tree.FindFolder(path)
  		if err != nil {
  			// no entry found... this is not an error
  			return nil
  		}
  		entries := sub.List(0)
  		if len(entries) != 1 {
  			fmt.Fprintln(os.Stderr, "gopass error: too many entries")
  			return nil
  		}
  		path = "git/" + entries[0]
  	}
  	secret, err := s.Store.Get(ctx, path)
  	if err != nil {
  		return ExitError(ctx, ExitDecrypt, err, "")
  	}
  	cred.Password = secret.Password()
  	username, err := secret.Value("login")
  	if err == nil {
  		// leave the username as is otherwise
  		cred.Username = username
  	}
  
  	_, err = cred.WriteTo(out.Stdout)
  	if err != nil {
  		return ExitError(ctx, ExitIO, err, "Could not write to stdout")
  	}
  	return nil
  }
docs: // GitCredentialGet returns a credential to git