简体   繁体   中英

SVN commit vs Git commit

I know Git has local and remote repo(since distributed), but my doubt is there any difference in SVN commit and Git commit(considering local git commit).

As per my understanding, both svn and git will maintain a version for the entire project per commit not keeping version only for the committed files as CVS does.Is that true ?

Then, are there any other differences (except the things like the way both systems store the versioning info, committing to local or central repo)?

SVN has no local repo. Therefore svn checkin is used to push your changes into the remote repo. GIT has a local repo. Commit creates a new 'version' in your local and your local only. Git push is then used to send this changeset into the remote.

I suggest your read this free resource: https://git-scm.com/book/en/v2 In particular this chapter should be of interest to you: https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain

SVN is a centralized application model. SVN commit pushes changes from the local client to a centralized repository. Git is a distributed application model. In Git the snapshots are committed to the local repository. Git commits can be pushed to arbitrary remote repositories. Source: https://www.w3docs.com/learn-git/git-commit.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM