Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)?

like image 718
Tom Sebastian Avatar asked Oct 27 '15 09:10

Tom Sebastian


People also ask

What is the difference between SVN and Git?

The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.

Is SVN better than Git?

SVN is better than Git for architecture performance, binary files, and usability. And it may be better for access control and auditability, based on your needs.

What is SVN commit?

svn commit — Send changes from your working copy to the repository.

What is the difference between Git commit and Git commit?

– Git commits are local meaning they are recorded only on the machine on which the commits actually occur. The “git commit” command is used to tell Git to save your changes to the local repository and you have to specifically tell Git which changes you wish to include in a commit before using the “git commit” command.


2 Answers

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

like image 156
Tomasz Kaminski Avatar answered Oct 05 '22 16:10

Tomasz Kaminski


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

like image 45
Alvard Sargsyan Avatar answered Oct 05 '22 16:10

Alvard Sargsyan