why we need to add at staging area before commit

+1 vote

Hi,

I'm new in Git & GitHub. From tutorials I came to know before commit, I have to add in staging area. 

Can somebody tell why we need to add into staging area before commit?

Thank You

Jan 31, 2020 in Git & GitHub by akhtar
• 38,170 points
124 views

1 answer to this question.

0 votes

Hi@akhtar,

The staging area is like a rough draft space, it's where you can git add the version of a file or multiple files that you want to save in your next commit (in other words in the next version of your project).

answered Jul 18, 2020 by MD
• 95,160 points

Related Questions In Git & GitHub

+1 vote
2 answers

undo git add before commit

git status git will tell you what is ...READ MORE

answered Aug 20, 2018 in Git & GitHub by Nilesh
• 7,020 points

edited Dec 21, 2020 by MD 1,872 views
0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,660 points
810 views
0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 10,550 points
1,954 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,064 views
+2 votes
1 answer
0 votes
1 answer

error: Could not read error: unable to read tree object HEAD nothing to commit (working directory clean)

Hi@akhtar,  This kind of error may occur if ...READ MORE

answered Apr 10, 2020 in Git & GitHub by MD
• 95,160 points
2,036 views
0 votes
1 answer

error on branch master nothing to commit, working directory clean, when try to commit my changes.

Hi@akhtar,  If you already have a .git/ folder ...READ MORE

answered Apr 10, 2020 in Git & GitHub by MD
• 95,160 points
4,860 views