in Technology by

 What is the use of Staging area or Indexing in Git?

1 Answer

0 votes
by
Git pull command pulls all new commits from a specific branch in the central repository and makes the target branch in your local repository up-to-date. Git fetch also aims at the same thing, however, its underlying functionality is a bit different. When you do a git fetch, all the new commits from a specific branch will be pulled in your central repository and these changes will be stored in a new branch in your local repository. This is called a fetched branch. If you wish to see these changes in your target branch, then you need to perform a git merge after git fetch. The target branch will be updated with the latest changes only after merging it with the fetched branch. So, a git pull brings the local branch up-to-date with its remote version, whereas a git fetch does not directly change your own local branch or working copy under refs/heads. Git fetch can be used to update your remote-tracking branches under refs/remotes//. In simple words, git pull is equal to git fetch followed by a git merge.

Related questions

0 votes
    What is the use of Staging area or Indexing in Git?git...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    What is ‘staging area’ or ‘index’ in Git?...
asked Nov 2, 2020 in Technology by JackTerrance
0 votes
    Which command shows the difference between the working directory and the index or staging area? A. git status B. git diff...
asked Dec 17, 2022 in Technology by JackTerrance
+1 vote
    What is the Staging area referring to ETL Testing?...
asked Oct 15, 2020 in Technology by JackTerrance
0 votes
    What is the Git command to skip staging and commit the changes directly? A. git skip stage B. git commit C. git commit -a -m “message” D. git add changes...
asked Dec 21, 2022 in Technology by JackTerrance
+1 vote
    When using Azure Resource Manager, you can use a _______________ for deployment, which can build identical environments ... work scenarios such as testing, staging, and production....
asked Oct 20, 2020 in Technology by JackTerrance
0 votes
    When using Azure Resource Manager, you can use a _______________ for deployment, which can build identical environments ... work scenarios such as testing, staging, and production....
asked Dec 11, 2020 in Education by Editorial Staff
0 votes
    What is the Git command to blow away all the changes in a file in the working area, since the previous commit? A. ... git log filename C. git checkout filename D. git rm filename...
asked Dec 21, 2022 in Technology by JackTerrance
0 votes
    When you run git fetch from your local repo, it will update your local changes in working area? A. True – ... It updates local repo only and does not affect the working area...
asked Dec 20, 2022 in Education by JackTerrance
0 votes
    What is Splunk Indexer? What are the stages of Splunk Indexing?...
asked Oct 31, 2020 in Technology by JackTerrance
0 votes
    I want to take all the changes I made in the staging to my working directory. What command should I use to perform this ... B. git reset HEAD C. git reset TAIL D. git change...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    There is no summary available of the big O notation for operations on the most common data structures ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 22, 2022 in Education by JackTerrance
0 votes
    There is no summary available of the big O notation for operations on the most common data structures ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    I have a Nutch index crawled from a specific domain and I am using the solrindex command to push the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    Which of the following indexing capabilities is used as a concise means of selecting data from a pandas object? ... and answers pdf, Data Science interview questions for beginners...
asked Oct 31, 2021 in Education by JackTerrance
...