2009-11-08 11 views

答えて

117
:q 

これは実際にはlessコマンドです。それはviと同じコマンドを使用します。

+3

これより少ない場合は、コロン(:)は不要です。あなたはviなら考えています! –

+8

ええ、ちょうど 'q'は –

+0

両方の作品..... ..... – RageZ

357

私はここで推測する必要がありますが、おそらくlessまたはmoreのような$ PAGERプログラムにその出力を実行している可能性があります。どちらの場合でも、qと入力すると消えます。

+8

gitで使用されるページャは 'core.pager'設定変数(設定されている場合)、GIT \ _PAGER環境変数、PAGER環境変数、そしてフォールバックとして' less'で選択されます。 –

+4

+1痛みを和らげてくれてありがとうございました – Anthony

+1

もう一度おねがいします。また、初心者です。 – 1088

85

「q」と入力するとジョブが実行されます。

あなたが端末にいて、同様の苦境を抱えている場合は、 'quit'、 'exit'、打ち切りキーの組み合わせ 'Ctrl + C'を入力してください。

+3

'' '' ps -ax'''を実行したとき、私は 'Ctrl + Z'を使っていて、終わっていない大量のgitプロセスで終了しました。 '' 'q''については知らなかった。 – brokenindexfinger

+1

Ctrl + Zはタスクをバックグラウンドに置くので意味があります。私は個人的にそれを閉じるためにCtrl + Cを得ることができませんでした。 qが働く。 – Amalgovinus

+0

Ctrl + Cはそれらの奇妙なインスタンスで動作します。 – 3366784

4

あなたは次にあなたが:q

+0

Windowsユーザーのための注意:私にとって、これらの行を追加すると、追跡にファイルを追加できなくなりました(致命的:CRLFはREADME.mdのLFに置き換えられます)。したがって、Windowsを使用している場合は、代わりに 'git config --global core.autocrlf true'を追加してください。 – ConcurrentHashMap

2

私の好みのコンボは、すべての差分を出力して終了Gq、ある使用することができますtermnial

git config --global core.autocrlf input 
git config --global core.safecrlf true 

に好みを終了セットアップラインに必要なすべての最初の。

あなたはこれがコンソールに出力され、少ないと対話するためのヘルプコマンドを表示するにはhを入力することができます。

    SUMMARY OF LESS COMMANDS 

     Commands marked with * may be preceded by a number, N. 
     Notes in parentheses indicate the behavior if N is given. 

    h H     Display this help. 
    q :q Q :Q ZZ  Exit. 
--------------------------------------------------------------------------- 

          MOVING 

    e ^E j ^N CR * Forward one line (or N lines). 
    y ^Y k ^K ^P * Backward one line (or N lines). 
    f ^F ^V SPACE * Forward one window (or N lines). 
    b ^B ESC-v  * Backward one window (or N lines). 
    z     * Forward one window (and set window to N). 
    w     * Backward one window (and set window to N). 
    ESC-SPACE   * Forward one window, but don't stop at end-of-file. 
    d ^D    * Forward one half-window (and set half-window to N). 
    u ^U    * Backward one half-window (and set half-window to N). 
    ESC-) RightArrow * Left one half screen width (or N positions). 
    ESC-( LeftArrow * Right one half screen width (or N positions). 
    F     Forward forever; like "tail -f". 
    r ^R ^L   Repaint screen. 
    R     Repaint screen, discarding buffered input. 
     --------------------------------------------------- 
     Default "window" is the screen height. 
     Default "half-window" is half of the screen height. 
--------------------------------------------------------------------------- 

          SEARCHING 

    /pattern   * Search forward for (N-th) matching line. 
    ?pattern   * Search backward for (N-th) matching line. 
    n     * Repeat previous search (for N-th occurrence). 
    N     * Repeat previous search in reverse direction. 
    ESC-n    * Repeat previous search, spanning files. 
    ESC-N    * Repeat previous search, reverse dir. & spanning files. 
    ESC-u    Undo (toggle) search highlighting. 
     --------------------------------------------------- 
     Search patterns may be modified by one or more of: 
     ^N or ! Search for NON-matching lines. 
     ^E or * Search multiple files (pass thru END OF FILE). 
     ^F or @ Start search at FIRST file (for /) or last file (for ?). 
     ^K  Highlight matches, but don't move (KEEP position). 
     ^R  Don't use REGULAR EXPRESSIONS. 
--------------------------------------------------------------------------- 

          JUMPING 

    g < ESC-<  * Go to first line in file (or line N). 
    G > ESC->  * Go to last line in file (or line N). 
    p %    * Go to beginning of file (or N percent into file). 
    t     * Go to the (N-th) next tag. 
    T     * Go to the (N-th) previous tag. 
    { ( [   * Find close bracket }) ]. 
    } ) ]   * Find open bracket { ([. 
    ESC-^F <c1> <c2> * Find close bracket <c2>. 
    ESC-^B <c1> <c2> * Find open bracket <c1> 
     --------------------------------------------------- 
7

Windowsの場合:終了のため

はCtrl + QとCの走行状況を。

-2

exit私のためでした。 returnを押した後の結果。

my-mac:Car Game mymac$ exit 
logout 
Saving session... 
...copying shared history... 
...saving history...truncating history files... 
    ...completed. 
[Process completed] 
+0

これはウィンドウ全体を閉じるのと同じですが、sshのようにgitセッションを終了するよう質問します –

1

終了コマンド(qなど)を押す前に、現在の入力言語を確認してください。英語以外のコマンドが機能しない可能性があります。

0

git bashを使用している場合は、exitを使用してみてください。

私はqやctrl + qを使ってみましたが、bashではうまくいきませんでした。

0

Crt + cはWindowsで動作します。 user1852392

関連する問題