Cómo copiar y pegar en Git Bash


Estoy usando msysgit corriendo en Windows XP.

Intentado Ctrl+V , Clic derecho, Clic medio, google... no hubo suerte.

Author: candlejack, 2010-02-21

28 answers

Pulse Insértese.

También, para copiar desde la ventana, intente hacer clic en el icono de la ventana de la consola (topleft) y elija Editar -> Marcar, luego arrastre un cuadro sobre el texto y luego presione Entrar. (También puede pegar a través del menú del icono de la ventana, pero la clave es más rápida.)

UPDATE

A partir de Windows 10, la CTRL + C, CTRL + V y un montón de otras características se implementan en conhost.exe por lo que deben trabajar con cada utilidad de consola en Windows. (Debe habilitar Propiedades -> Pestaña de opciones -> Modo de edición rápida)

Ref: http://blogs.windows.com/buildingapps/2014/10/07/console-improvements-in-the-windows-10-technical-preview/

 1002
Author: Amber,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-29 18:55:36

Además de usar los comandos del menú editar, puedes pegar directamente en la ventana de git bash usando el atajo de teclado, Insert.

 137
Author: Dan Rigby,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-11-21 00:56:41

No es realmente una función de git, msys o bash; todos los programas de la consola de Windows están atascados usando el mismo engorroso mecanismo de copiar/pegar por razones históricas. Activar modo QuickEdit puede ayudar can o puede instalar una consola alternativa agradable como esta , y cambiar su acceso directo git bash para usarlo en su lugar.

 65
Author: hobbs,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-03 16:31:40

Copia:

Solución a largo plazo: Haga clic en el icono Topleft > Valores predeterminados > Seleccione "Modo de edición rápida" en "Opciones de edición" > Bien

A continuación, seleccione el texto que desea copiar. Presione Enter

Solución a corto plazo: Haga clic en el icono Topleft > Editar > Marcar. Presione Enter.

Pegar:

Pulse Insértese

(Si el "Modo QuickEdit" está activado, hacer clic derecho también podría funcionar.)

 58
Author: HaoQi Li,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-29 21:53:19

Use Shift + Insertar como en linux bash

Editar: Funciona incluso en masilla.

 25
Author: Anatoly Mironov,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-01-08 22:01:33

La forma en que hago esto es mantener Alt luego presionar Space, luego E y finalmente P.

En Windows Alt salta a la ventana de menú, Espacio abre, E selecciona Editar y P ejecuta el Pegar comando.

Obtenga estos correctos en sucesión y puede pegar un fragmento en menos de 2 segundos.

 18
Author: iKlsR,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-08-30 19:16:23

Esto es sugerido por la página de ayuda de github :

clip < filename

Esto copia el contenido de filename al portapapeles y es útil para hacer cosas como copiar su id_rsa.pub a un formulario web.

 9
Author: Tim D,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-04-01 21:31:25

Para pegar en Git BASH CTRL + P

 6
Author: Ehigie Paul,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-03-09 19:14:43

Haga clic derecho en el acceso directo de Git Bash y cambie a la pestaña Options. Habilite Modo de edición rápida y haga clic en OK .

Ahora puedes usar clic derecho para pegar en Git Bash, incluso contraseñas para push remoto, que no puedes hacer con Insert.

introduzca la descripción de la imagen aquí

Esto también permite copiar fácilmente. Simplemente haga clic izquierdo eny arrastre en la ventana de la consola para seleccionar cualquier bloque de texto. Ahora haga clic derecho en la selección y el el bloque de texto se copiará en la RAM. Esto es mucho más fácil e intuitivo que las otras formas.

Fuente de la imagen: https://danlimerick.wordpress.com/2011/07/23/git-for-windows-tip-how-to-copy-and-paste-into-bash/

 5
Author: datasn.io,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-08-05 06:32:08

Consola2 ( http://sourceforge.net/projects/console / ) es mi ir a la terminal front end.

Agrega grandes características como copiar/pegar, ventanas redimensionables y pestañas. también puede integrar tantos "terminales" como desee en la aplicación. yo personalmente uso cmd (el prompt básico de Windows), MinGW/msysGit, y tengo atajos para bucear directamente en los intérpretes de python y mysql.

El argumento "shell" que uso para git (en una máquina win7) es:

C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i"

 4
Author: xero,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-12-20 22:09:00

Ctrl + insertar, lo hizo por mí en Windows.

 4
Author: Patricia Beier,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-03-09 19:16:28

Si su intención es copiar/pegar comentarios para confirmaciones de git, intente establecer el EDITOR de variables ambientales como su editor de texto sin formato favorito (bloc de notas, bloc de notas++ ...) y cuando te comprometas, no le des la opción-m y Git abrirá tu editor favorito para copiar/pegar tu comentario

 3
Author: Lucas,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2010-03-02 17:08:39

Obtener Consola2. Usted lo configura para hacerlo de varias maneras diferentes. Funciona con indicaciones de comandos de bash o Windows.

 3
Author: Jon Kruger,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-10-27 12:28:35

También puede hacer clic con el botón derecho en la ventana de la consola. Asegúrese (según las respuestas anteriores) de habilitar ambas 'Opciones de edición' en el panel de Propiedades (desde el menú del sistema).

 3
Author: John Kelleher,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-12-17 21:17:36

En las propiedades de la consola puede activar el "Modo de edición rápida" en "Opciones de edición", de esa manera puede pegar dentro de la consola con solo hacer clic derecho. O puedes usar 'Insertar' como dicen.

 3
Author: epergo,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-07-22 17:43:46

Estoy de vuelta a Windows por primera vez en mucho tiempo y esto me hizo maldecir como un estibador. Finalmente encontré esto:

ctrl_shift_letter_shortcuts

Habilitar "Ctrl+Shift+atajos de letras" me llevó a un comportamiento similar a Linux que ha bajado mi presión arterial. Ctrl + Shift + C / V ahora funciona.

 3
Author: David Carboni,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-02-06 21:56:06

En realidad me preguntaba cómo hacer esto hoy...y casualmente, Phil Haack publicó un consejo sobre el uso de posh-git (Git en powershell), que te da tab autocompletado y algunos bits más interesantes. No voy a volver a Git Bash.

Compruébalo

Http://haacked.com/archive/2011/12/13/better-git-with-powershell.aspx

 2
Author: GR7,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-12-13 22:21:55

Sí, la copia de algún otro lugar utilizando ctrl+c y pegar usando INSERTAR. Trabaja para mí en la ventana 8.

 2
Author: HoaPhan,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-03-09 18:45:19

En Windows no estoy seguro de copiar, pero para pegar funciona Ctrl+Insertar. En Linux copia: CTRL+CAMBIO+C, pegar: CTRL+CAMBIO+V

 1
Author: Кирилл Васин,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-30 11:53:07

Utilizo el ratón :

  1. mark
  2. haga clic derecho - > copiar
  3. clic derecho - > pegar
 1
Author: Hind,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-07-20 20:08:08

COPIAR:Haga clic en la barra de título, elija marcar y, a continuación, seleccione el contenido que desea copiar. PEGAR: Copie lo que desee, concéntrese en la fiesta, presione la tecla insertar en el teclado.

 0
Author: Lizzy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-05-08 06:51:48

Para usuarios que trabajan en Windows 7, Shift + INSERTAR funciona bien.

 0
Author: Abdullah Khan,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-02 11:06:39

Supongo que no estás en un Mac. Utilice la tecla insert.

 0
Author: HoaPhan,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-27 05:54:31

Aquí hay muchas respuestas ya, pero ninguna de ellas funcionó para mí. Para tu información, tengo un portátil Lenovo con win10 y lo que funciona para mí es lo siguiente:


Paste = Shift+fn + prt sc


Copy = Shift+fn + c

 0
Author: Mik_A,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-03-25 09:08:53

introduzca la descripción de la imagen aquí

Después de esta configuración puede usar ctrl + shift + v ( para windows)

 0
Author: Sanjib Debnath,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-07-11 13:52:21

También paso por el mismo problema, git bash no admite el método tradicional para copiar y pegar en Windows, pero simplemente puede copiar y pegar en un solo comando

MAYÚS + fn + INSERTAR

 0
Author: Avnish kumar,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-07-29 08:18:21

Si hace clic en el icono en la esquina superior izquierda, aparecerá un menú desplegable, y puede encontrar la opción para copiar/pegar desde allí.

 0
Author: mark,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-09-06 08:27:13

El MacBook pro no tiene una clave ins. Use FN + INTRODUZCA para pegar

 -2
Author: Borune,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-30 11:53:47