Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
GitLab
SourceForge
Launchpad
Phabricator
Gogs
Beanstalk
GitKraken
Launchpad
AWS CodeCommit
Gitea
 Rhodecode
 :) Hot Jobs
 
 :) Latest Articles


  

 


Explain all things about Git Reset and syntax?
Question Posted on 08 Nov 2022

Home >> Repository Questions >> Git Questions >> Explain all things about Git Reset and syntax?




Explain all things about Git Reset and syntax?
Git reset is like Git revert is a tool used to undo changes. And Git reset has mainly three primary invocation forms and have three command-line arguments as given below:-

(1)--soft
(2)--mixed
(3)–hard

The arguments in turn is correspond to Gits three internal state management mechanisms as given below:

(1)Commit Tree (HEAD)
(2)Staging Index
(3)Working Directory

And here Git reset moves the repository back to an earlier commit and also used to delete any changes made after the commit in question.

And Programmers can perform a Git reset revert by using below code or syntax:-

git reset

And this action removes the named file from the staging area, and the working directory remains unchanged. However, if we want to reset the staging area so it matches the most recent commit while leaving the directory untouched we use below command or syntax:-

git reset

But one thing to be taken care that Git reset is one of the few Git commands that risk the user losing their work and it can undo local changes in both the Working Directory and the Staging Index.
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Why Git is fast and which language is used in GIT?
What is syntax to fix a broken commit in GIT?
What is GitLive new features that will change the game?
What is Subgit and what is the use of this?
Difference between Git and SVN






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |