首页 > 解决方案 > git: 'remote-hittps' 不是 git 命令。见'git --help'

问题描述

我第一次使用 git bash,当我尝试将远程设置为上游时,我不断收到此错误。这有点令人困惑,因为我根本不使用 remote-hittps。

omaro@DESKTOP-SLPOLVC MINGW64 ~/OneDrive - UW/Desktop/MazeSolver (main)

$ git status
On branch main
nothing to commit, working tree clean

omaro@DESKTOP-SLPOLVC MINGW64 ~/OneDrive - UW/Desktop/MazeSolver (main)

$ git remote -v

origin  hittps://github.com/theoystertoaster/MazeSolver.git (fetch)
origin  hittps://github.com/theoystertoaster/MazeSolver.git (push)

omaro@DESKTOP-SLPOLVC MINGW64 ~/OneDrive - UW/Desktop/MazeSolver (main)

$ git push

fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin main


omaro@DESKTOP-SLPOLVC MINGW64 ~/OneDrive - UW/Desktop/MazeSolver (main)

$ git push --set-upstream origin main

git: 'remote-hittps' is not a git command. See 'git --help'.


The most similar command is

        remote-https

omaro@DESKTOP-SLPOLVC MINGW64 ~/OneDrive - UW/Desktop/MazeSolver (main)

标签: github

解决方案


您输入了错误的网址。它从hittps应该开始的时间开始https。您可以通过执行以下操作来解决此问题:

$ git remote set-url origin https://github.com/theoystertoaster/MazeSolver.git

推荐阅读