2013-10-14 30 views
3

我無法從CMD控制檯窗口運行git。我需要運行它,因爲TortoiseGit不夠聰明,無法接受自簽名證書來導入SVN存儲庫。我需要在命令行運行git.exe。如果已經安裝了TortoiseGit,如何從命令行運行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) 

回答

4

破碎

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.