InterviewSolution
| 1. |
What is the function of ‘git diff ’ in git? |
|
Answer» 'git diff ' dependably show the progressions between various submits, submit and working tree etc. Git has an INUIT Index between local repo and our working directory. So the vast majority of Git directions really allude to list or the local repo. When we state HEAD in our Git direction, it really alludes the local repo. //contrast the working directory and local repo.
//contrast the working directory and index.
//contrast the index and local repo.
We can likewise look at records from two distinctive submits. Each submit in Git has a hash submit ID which we can get when we type git log. At that point, we can utilize the submit id with diff order this way.
We can look at a solitary file, YET the entirety of our progressions WITHOUT a moment's delay. On the off chance that we have made changes in numerous files, simply don't make reference to any file name in the diff direction which will diff all the changed records. //CONTRASTS working directory and index, //for example, demonstrates the progressions that are not staged yet.
//contrasts working catalog and local repo //demonstrates the rundown of changes after your last submit.
//contrasts index and local repo //demonstrates the diff between your last submit and changes to be submitted straightaway.
|
|