60148/what-steps-unstage-files-discard-changes-working-directory
If the git status command displays 'myfile.txt' as file pending to commit then
To unstage a file(which is not yet committed but in staging stage); command 'git reset <file-name>' is used. After using 'git reset HEAD myfile.txt' command; 'git status' command won't show myfile.txt within the list of files unfinished to commit, currently it'll be displayed below the list of the unstage/untracked files.
Now to discard the changes('myfile.txt') in working directory; command 'git checkout -- <file-name>' is used. After using 'git checkout -- myfile.txt' command; 'git status' command will not show myfile.txt in the list of unstage/untracked files as this file 'myfile.txt' will be replaced with the last committed version from the repository.
Hi@Shashi, It depends on your use case. How ...READ MORE
What are the steps to set up ...READ MORE
What do you see as the weaknesses ...READ MORE
In Jenkins, large volumes of artifacts from builds are the heart and soul of optimizing storage usage ...READ MORE
Hey @nmentityvibes, you seem to be using ...READ MORE
Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE
It can work if you try to put ...READ MORE
When you use docker-compose down, all the ...READ MORE
To remove a file for example 'myfile.txt'; ...READ MORE
If we have a file called 'myfile.txt' ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.