10. Rename and Restore files in GIT Repository using the mv and the restore command - GIT

preview_player
Показать описание
In this video, we will see how to rename and remove files in the GIT repository using the mv and the restore command in the GIT Project.

If you like my video, please subscribe to my channel.

My Playlists:

My Courses Playlist Page:

#GIT #leelawebdev

Join this channel to get access to perks:
Рекомендации по теме
Комментарии
Автор

Restore command when used on a working area file (which is not staged yet) then it will restore the file as we have on the repository level or staged area (if the staged area and repository have a different version of the file). I meant I changed the file and then staged it and then again changed the file and use the restore in the working area file then it will restore the file to the previously staged changes or the repository version of the file.

rohiagarwal
Автор

I have several files from different directories which got changed while working on web application, so now I want to undo those changes. Therefore what is the command to restore a directory (which is not staged yet)?

shree
Автор

Hi Sir,
To revert changes from staging area to working area.
You are using git restore --staged (filename).
Instead, we can use "git reset" command. Am i right?

Orelse, we can do more from git reset command?

HarinathreddyGundareddy
Автор

I got a question here
We modified the file, then we restored the file, command : git restore context .text
Which will clear the modified lines . now my requirement is how to go back or command to go back again to the modified section, where we get lost line back which caused after restore ?

chethanchethan
Автор

Hi sir If I use git --hard HEAD^ could I restore my files??

-ShajanJ
Автор

How to change command names in git
Example: rename add command to my_add

vajjaanuja