Delete one or more modified files in the working directory
The above command will delete all the changes you have added to that file.
The above command only applies to files that are not in the staging area.
Move one or more files from the Staging area to the Working directory
In fact, after you do git add to add files and staging areas, but you feel uncomfortable and want to move those files back to the working directory.
You can do the following:
Edit and manipulate committed files
There are 3 options for us:
- Git reset --soft
- Git reset --mixed
- Git reset --hard
The above command will redirect the commit with the above id to staging area status.
The same goes for --mixed and --hard which will return the commit to the staging area or delete the commit as well.
Note when using --hard if not careful will lose data.
This part pauses here.
I wish you happy learning.
Categories: Learn programming