diff --git a/book/07-git-tools/sections/interactive-staging.asc b/book/07-git-tools/sections/interactive-staging.asc index 06bc7366..0232f3f1 100644 --- a/book/07-git-tools/sections/interactive-staging.asc +++ b/book/07-git-tools/sections/interactive-staging.asc @@ -1,11 +1,11 @@ [[_interactive_staging]] -=== Interactive Staging +=== Organización interactiva -Git comes with a couple of scripts that make some command-line tasks easier. -Here, you’ll look at a few interactive commands that can help you easily craft your commits to include only certain combinations and parts of files. -These tools are very helpful if you modify a bunch of files and then decide that you want those changes to be in several focused commits rather than one big messy commit. -This way, you can make sure your commits are logically separate changesets and can be easily reviewed by the developers working with you. -If you run `git add` with the `-i` or `--interactive` option, Git goes into an interactive shell mode, displaying something like this: +El git viene con unos cuantos scripts que hace que algunas líneas de comando sean más fáciles de usar. +Aquí, Veras unos cuantos comandos interactivos que te ayudaran a preparar tus confirmaciones para incluir solo ciertas combinaciones y partes de los archivos. +Estás herramientas serán muy útiles si modificas unos cunatos archivos y decides que quieres esos cambios estén en varias confirmaciones enfocadas más que en una gran problemática confirmación. +De esta manera, puede asegurarse de que sus confirmaciones sean conjuntos de cambios lógicamente separados y que puedan ser revisados fácilmente por los desarrolladores que trabajan con usted. +Si empiezas `git add` con el `-i` o la opción `--interactive` , Git entra en un modo de celda interactiva, mostrando algo como esto: [source,console] ---- @@ -21,15 +21,15 @@ $ git add -i What now> ---- -You can see that this command shows you a much different view of your staging area – basically the same information you get with `git status` but a bit more succinct and informative. -It lists the changes you’ve staged on the left and unstaged changes on the right. +Puedes ver que este comando te muestra una muy diferente vista de tu área de ensayo – básicamente la misma informacion que con el with `git status` pero un poco más sucinto e informativo. +Muestra los cambios que haz realizado en la izquierda y cambios que no haz hecho a la derecha. -After this comes a Commands section. -Here you can do a number of things, including staging files, unstaging files, staging parts of files, adding untracked files, and seeing diffs of what has been staged. +Después de esto viene una sección de comandos. +Aquí puedes hacer un sin número de cosas, incluidos los archivos organizados, archivos sin organizar, partes de archivos organizados, agregar archivos sin seguimiento y ver las diferencias de lo que se ha modificado. -==== Staging and Unstaging Files +==== Organizar y desorganziar archivos -If you type `2` or `u` at the `What now>` prompt, the script prompts you for which files you want to stage: +Si tecleas `2` o `u` en el `What now>` rápidamente, la secuencia de comandos le solicita los archivos que desea representar: [source,console] ---- @@ -41,7 +41,7 @@ What now> 2 Update>> ---- -To stage the TODO and index.html files, you can type the numbers: +Para organizar los archivos de TODO and index.html , puedes teclear los números: [source,console] ---- @@ -53,8 +53,8 @@ Update>> 1,2 Update>> ---- -The `*` next to each file means the file is selected to be staged. -If you press Enter after typing nothing at the `Update>>` prompt, Git takes anything selected and stages it for you: +El `*` después de cada archivo significa que el archivo fue seleccionado para ser organizado. +Si presionas Enter después de no escribir nada en el `Update>>` rapidamente, Git toma cualquier cosa seleccionada y la organiza por ti: [source,console] ---- @@ -71,7 +71,7 @@ What now> 1 3: unchanged +5/-1 lib/simplegit.rb ---- -Now you can see that the TODO and index.html files are staged and the simplegit.rb file is still unstaged. +Ahora puedes ver que los archivos de TODO and index.html han sido organizados y el archivo simplegit.rb aun está sin organizar. If you want to unstage the TODO file at this point, you use the `3` or `r` (for revert) option: [source,console] @@ -93,7 +93,7 @@ Revert>> [enter] reverted one path ---- -Looking at your Git status again, you can see that you’ve unstaged the TODO file: +Mirando el estatus de tu Git de nuevo, puedes ver que haz desordenado el archivo de TODO: [source,console] ---- @@ -107,9 +107,9 @@ What now> 1 3: unchanged +5/-1 lib/simplegit.rb ---- -To see the diff of what you’ve staged, you can use the `6` or `d` (for diff) command. -It shows you a list of your staged files, and you can select the ones for which you would like to see the staged diff. -This is much like specifying `git diff --cached` on the command line: +Para ver la diferencia de lo que ya haz ordenado, puedes usar el `6` o `d` (para diferente) comando. +Este te muestra una lista de tus archivos organziados, y puedes seleccionar aquellos que quisieras ver la diferencia de su organización. +Esto es como especificar el `git diff --cached` en la línea de comando: [source,console] ---- @@ -134,14 +134,14 @@ index 4d07108..4335f49 100644