-1

I found several answers on commit/push topic here in stackoverflow. However, these answers are about the difference between committing and pushing in which I'm not interested.

My question is, why do we need local commit and then push this in repository? Why isn't commit remote like in svn?

I only have problems with that. I commit something, and after two hours I want to push but get errors because someone else has also changed that file. If that commit was remote, I would not have these problems, so I really don't the benefits. :)

Eran
  • 387,369
  • 54
  • 702
  • 768
chao
  • 1,893
  • 2
  • 23
  • 27
  • Also: http://stackoverflow.com/a/2563917/6309 and http://stackoverflow.com/q/2704996/6309 – VonC Jun 02 '13 at 15:09
  • Check out any introductory documentation on mercurial (including the site blurb), it'll set you straight on the reasons. – alexis Jun 03 '13 at 01:05

2 Answers2

1

Centralized vs. a distributed version control with total different characteristics. In a centralized CVS I'm dependent on access & permission to the central repository while a distributed VCS typically offers many benefits and better tools for non-linear and/or branched development approaches.

I think this question is not very constructive and duplicates i.e. Comparison between Centralized and Distributed Version Control Systems

Community
  • 1
  • 1
bentolor
  • 3,126
  • 2
  • 22
  • 33
  • oh, I see. There are two different things like centralized and distributed version controls. I missed this information, so I consequently duplicate question. Thanks anyway. Now I know what to read... – chao Jun 02 '13 at 14:50
  • @chao Glad to help out. So can you mark your question as answered? – bentolor Jun 02 '13 at 19:46
1

This is really no different than svn. If it has been a while since you did an svn update, you are very likely to get either errors or merge conflicts. The issue with git/mercurial is it has been a while doing a pull when you did your push.

cforbish
  • 8,567
  • 3
  • 28
  • 32