how discharge changes e recover last commit git 1

how discharge changes e recover last commit git

git reset HEAD --hard

Here is what the above code is Doing:
1. git fetch –all
– This will fetch all the branches from the remote repository.
2. git reset –hard origin/master
– This will reset the local master branch to the remote master branch.
3. git clean -f
– This will remove all the untracked files from the local repository.
4. git pull
– This will pull the latest changes from the remote repository.
5. git reset HEAD –hard
– This will reset the local repository to the latest commit.

Similar Posts