Search code examples
gitgithubgithub-actions

git remote and origin <url> not working. error raised as unknown subcommand


can anyone please guide me with these git commands. I've followed the steps from the github site to push the code. but i'm getting this error.

note: there is no error in url

git remote and origin https://github.com/Goutham10/MatchGame.git

error: Unknown subcommand: and

usage: git remote [-v | --verbose] or: git remote add [-t ] [-m ] [-f] [--tags | --no-tags] [--mirror=<fetch|push>]

  -v, --verbose         be verbose; must be placed before a subcommand

Solution

  • You have a typo in your subcommand

    git remote add origin <url>