我在關注this MOOC以瞭解Git。我輸入Git Bash的第一個命令是git --version
它給了我git version 2.8.3.windows.1
。Git命令如「git clone」在Git Bash中不工作
然後我輸入git clone https://github.com/udacity/asteroids.git
爲了克隆存儲庫。在視頻講座,講師的屏幕看起來是這樣的,當他們進入命令:
但在我的Git猛砸,我得到下面的輸出。正如你在開始時看到的,$ git clone
出現兩次,但我只輸入了一次命令。此外,我沒有看到添加到我打開Git Bash的目錄中的任何內容。
我應該如何解決這個問題?
$ git clone $ git clone
Too many arguments.
usage: git clone [<options>] [--] <repo> [<dir>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--progress force progress reporting
-n, --no-checkout don't create a checkout
--bare create a bare repository
--mirror create a mirror repository (implies bare)
-l, --local to clone from a local repository
--no-hardlinks don't use local hardlinks, always copy
-s, --shared setup as shared repository
--recursive initialize submodules in the clone
--recurse-submodules initialize submodules in the clone
--template <template-directory>
directory from which templates will be used
--reference <repo> reference repository
--dissociate use --reference only while cloning
-o, --origin <name> use <name> instead of 'origin' to track upstream
-b, --branch <branch>
checkout <branch> instead of the remote's HEAD
-u, --upload-pack <path>
path to git-upload-pack on the remote
--depth <depth> create a shallow clone of that depth
--single-branch clone only one branch, HEAD or --branch
--separate-git-dir <gitdir>
separate git dir from working tree
-c, --config <key=value>
set config inside the new repository
-4, --ipv4 use IPv4 addresses only
-6, --ipv6 use IPv6 addresses only
真的好像你沒有運行'git clone https:// github.com/udacity/asteroids.git',而是'git clone $ git clone'?即使這只是一個顯示問題,克隆URL仍然缺失。但是,然後git應該說「太少的論點」,而不是「太多」... –
你是否也應付$? –
「git clone $ git clone」這就是3參數,順便說錯了;-) – murraybo