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,230 points
490 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 19, 2020 by MD
• 95,440 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,050 points

edited Dec 21, 2020 by MD 2,796 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,700 points
2,000 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,610 points
12,319 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,439 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,440 points
8,094 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,440 points
17,456 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP