jueves, 19 de noviembre de 2020

GIT Demystifying part 2

 GIT Demystifying part 2

 The file1 is modified by user and marked as red because it need to be added in order to be able to commit it, the user undo the changes and disappear of the Stage area. The same undo operation can be achieved simply by the git restore file1 command.

Also can see the diference between git rm and simply rm command.




  Detailed operations on console, for modify file1, create file2, add and commit


Detailed operations on console, for Delete File2 from Working Directory and in Stage ready to Commit
and Delete File1 from Working Directory, Stage.


Actually there no are file1 or file2 on Working Directory. The file can be restored with
git restore file1
or commited with
git commit -a -m "file1 deleted"

At this point we have file2 deleted commited, and file1 deleted from Working Directory.
what we can do with file1.

1.- Restore file1, I mean undelete it, with git restore file1 command.
2.- prepare to commit his delete of file1. with git add file1 command.

eot

No hay comentarios:

Publicar un comentario