开发者

Git easier to use than svn? [closed]

开发者 https://www.devze.com 2023-02-21 23:07 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

We are currently using SVN as our version control system for php development but we are thinking about changing to git. SVN seems to break quite often and as a result we get errors like these when trying to commit:

svn: Item 'xyz' is out of date 
svn: Working copy 'xyz' locked (svn cleanup doesn't solve this) 
svn: Working copy missing

So the functionalit开发者_JAVA技巧y we are missing is to tell the version control system that the local version is now fine, just push it to the repository (without endless errors).

Does git have this kind of feature? Is it easier to use?


FWIW I've used and adminned our office SVN for years now and I've seen very few errors like this. (I was going to write a quick comment but it got too long.)

  • Out of date

    This isn't an error - this simply means you'll need to update and merge remote changes into your local changes before you can commit. In git you can always commit to a local branch but someone's going to have to carry out the merge at some point - this isn't something that just goes away for free. Git advocates will tell you it has better automated merge but it's not completely psychic either.

    Of course in subversion you can always make and switch to your own branch to commit to too.

  • Working copy locked

    I have seen one or two of these that can't be solved by cleanup but they're very rare - none personally, one or two around the office. You'll just have to get a new checkout of the broken directory, copy your changes over to it, swap it into your tree and then commit.

    I've no idea what caused this or how to reproduce it - it's just an error. I doubt git or anything else is completely error free. (And svn is many years more mature than git.)

  • Working copy missing

    Ditto this one - I've never seen this one. Google says it might be related to changing a filename's case on a case-insensitive filesystem - I don't know whether git supports that cleanly or not but it's a rare operation unless you have checkouts on a case-sensitive system and then you can just make this change there without any problems.

Is git easier to use? That's fairly subjective - it's different. If anything I'd say SVN was conceptually easier because it's simpler, but git isn't hard either.

0

精彩评论

暂无评论...
验证码 换一张
取 消