- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
My understanding is that SVN 1.5 or later can be configured to launch your favourite 3-way merge tool when it detects conflicts while updating your working directory, so that the update-merge-commit paradigm should result in the same commit as the commit-fetch-rebase-push paradigm used by git.
Admin
I don't see how that could possibly be.
Admin
Agreed; surely
update-merge-commit
is more likepull-merge-commit-push
?Admin
Sort of, except in the case of svn, the merge part is happening with transient changes, not something that's already been stored in the repository's history. If you mess up a merge of stuff already committed, you can go back and do it again. If you do mess up the merge of your uncommitted changes with svn, you're fucked (unless you copied all your changes off to another directory or something).
Admin
Sure, but if you pull before committing in Git, isn't that the same problem of transience? You seem to be talking about
commit-pull-merge-push
or some suchAdmin
I don't git, but doesn't pull just pull in new commits from the remote repo to your local repo? It doesn't mess with your working copy (or whatever the gitism is) does it?
The pull and push are distractions. Imagine the stuff is there (or that git is acting like a CVCS). Remember that in svn, you can't commit if your working copy isn't at HEAD and if someone has changed a file after your working revision that you have also changed in your working copy.
Admin
wait, I thought the local repo basically was your working copy. I'm officially confused. All I know is when I hit the "sync" button in Github for Windows (which appears to do a push and a pull), the files in my local folder change to reflect updates done in Github's version of the repo.
Admin
Admin
The local repo contains all the history of commits. When I say, "working copy," I'm talking about the files that you're working with.
That probably includes an update or something. I have no clue what's going on there. When I DVCS, I use hg.
Admin
Admin
A pull is both a fetch and a merge, apparently: http://stackoverflow.com/questions/18529206/when-do-i-need-to-do-git-pull-before-or-after-git-add-git-commit
So I was right, it does change your files.
Admin
Ah, an
hg
pull is just agit
fetch, then.hg
usesupdate
likesvn
.Yes, but you asked for it. You could have just fetched and done a merge of two commits, instead of your transient changes.
Admin
It's worse than that. You can commit (by forcing it) if your working copy isn't at HEAD. So guess what some people do? :facepalm:
Admin
Nope - Pull includes an implicit merge (if needed), and it won't let you pull unless you've committed your stuff, for exactly that reason :stuck_out_tongue:
Fetch does not, but fetch only gets the commits, it doesn't do anything to your working copy
ED: :hanzo:
Admin
Admin
Oh no... That's not OK to do
Yeah, that's the same as the idiots who force push (hehe star wars joke) stuff in git
Admin
...
It won't let you pull and overwrite things, because it triggers an untracked changes error, OK?
I'm considering :triangular_flag_on_post: for pendants
Admin
Admin
Ah, why the hell not.
:triangular_flag_on_post:ed