我无法从CMD控制台窗口运行git。我需要运行它,因为TortoiseGit不够聪明,无法接受自签名证书来导入SVN存储库。我需要在命令行运行git.exe。
git.exe svn clone "https://eaxmple.net/svn" "C:\xxx\git" -T trunk
Initialized empty Git repository in c:/xxx/git/.git/
Error validating server certificate for 'https://esample.net:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
- Hostname: xxx.net
- Valid: from Jul 23 00:00:00 2012 GMT until Jul 23 23:59:59 2017 GMT
- Issuer: Register.com, US
- Fingerprint: ax:2x:bx:x6:7x:c8:ae:82:01:bx:4a:77:51:dd:9d:6d:e5:63:42:39
(R)eject, accept (t)emporarily or accept (p)ermanently? RA layer request failed: PROPFIND request failed on '/svn': PROPFIND of '/svn': Server certificate verification failed: issuer is not trusted (https://example.net) at C:\msysgit/libexec/git-core\git-svn line 2327
git did not exit cleanly (exit code 1) (5366 ms @ 10/14/2013 9:26:05 AM)
答案 0 :(得分:5)
断
C:\>git
'git' is not recognized as an internal or external command,
operable program or batch file.
固定
C:\>PATH=%PATH%;C:\msysgit\bin;C:\msysgit\mingw\bin
C:\>git
usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--inf
-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[-c name=value] [--help]
<command> [<args>]
The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and merge with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
See 'git help <command>' for more information on a specific command.