0

In SVN, you can commit by typing svn commit. However, in git you would have to git add first and then git commit. I saw that git add is useful because you can tell the system which specific files you want to commit. However, you can also do that with svn's commit. Therefore, I don't think that statement holds.

What's the advantage of using the staging area?

Thenewstockton
  • 443
  • 6
  • 18
  • 1
    Advantage over what? – Amit Aug 01 '16 at 18:45
  • You can use it as a soft commit while making changes - you can return to a staged version easily, but until you commit there aren't any permanent changes to your branch. Also see [this post](http://programmers.stackexchange.com/questions/69178/what-is-the-benefit-of-gits-two-stage-commit-process-staging) on the Programmers SE – Conduit Aug 01 '16 at 18:49
  • 1
    Try these three pages: http://stackoverflow.com/questions/4878358/why-would-i-want-stage-before-committing-in-git http://programmers.stackexchange.com/questions/69178/what-is-the-benefit-of-gits-two-stage-commit-process-staging http://gitolite.com/uses-of-index.html (I am not particularly endorsing any or all of these, just suggesting that they're of interest) – torek Aug 01 '16 at 18:52
  • You can also bypass the git add step by doing a git commit -- ... form of git commit. You can list one or more files on that line. – David Neiss Aug 01 '16 at 23:16
  • Possible duplicate of [Why would I want stage before committing in Git?](https://stackoverflow.com/questions/4878358/why-would-i-want-stage-before-committing-in-git) – Cibin Joseph Jan 23 '18 at 11:08

0 Answers0