GIT 1.Why do we need git add command in GIT? GIT gives us a very good feature of staging our changes before commit. To stage the changes we use git add command. This adds our changes from working directory to the index. When we are working on multiple tasks and we want to just commit the finished tasks, we first add finished changes to staging area and then commit it. At this time git add command is very helpful. 2. Why do we use git reset command? We use git reset command to reset current HEAD to a specific state. By default it reverses the action of git add command. So we use git reset command to undo the changes of git add command. 3. What does a commit object contain? Whenever we do a commit in GIT by using git commit command, GIT creates a new commit object. This commit objects is saved to GIT repository. The commit object contains following information: 1. HASH : The SHA1 hash of the Git tree that refers to the state of index a...
Top 1000+ Interview Question Java JSP Spring Hibernate java collection multithreading java string serialization and desensitization final keyword in java package java design patterns maven git repository cloud computation UNIX shell interview question