Earlier quoted context omitted.
Are you serious? With a DVCS you can commit to a personal repository offline, this in itself is a killer feature. Git also tracks content rather than files which makes renaming so much less problematic when it comes to subsequent merges (and who likes merges?). Git has the concept of stashing changes enabling rapid context switches without losing work in progress. It is significantly faster. It uses less disk space f…
Are you serious? Was that necessary? As I said to billybob, when I work in cvs or Subversion, my team is working on a branch. Personally, I work on a branch of that branch. I check in anytime I like. When I want my teammates to receive my code, I merge back to the team branch. So, I don't really get the 'sandbox' advantage of git. Speed and disk space have never been an issue for me with cvs or Subversion. The conten…
PHP will switch to git
101–108 of 108 posts
Re: PHP will switch to git
#102Earlier quoted context omitted.
Next time you have to use git: Remember, there are also patch-queues for git.
/me did not know this - thank you for the fill in (I'll stop preaching about them for hg then, I thought they were unique to hg!)
Nowadays the choice between git and mercurial comes down mostly to preferring on the user interface over another.
Re: PHP will switch to git
#103Earlier quoted context omitted.
Next time you have to use git: Remember, there are also patch-queues for git.
Which do you use? I've had a quick google and only found Guilt as a serious contender, and that doesn't seem to quite do what hg patch queues do (especially wrt publishing queues). I'm interested as it seems like quite a common workflow (for me at least) that doesn't really fit into the Git model.
My co-workers use Guilt.
We had published patch-queues in another department I worked for, and they were one of the reasons they switched to git instead.
I've never warmed up to patch-queues, but I haven't really tried to use them seriously.
Re: PHP will switch to git
#104Earlier quoted context omitted.
I'm pretty addicted to git's lightweight branching now. Mercurial looks appealing in some ways but, from what I understand, it doesn't support anything similar, at least not in the core.
You are thinking of Bookmarks, which have been a part of core since 1.8 and was an extension included with mercurial for a few versions prior.
Re: PHP will switch to git
#105Earlier quoted context omitted.
"is distributed version control so much better than centralized version control that we will all eventually be using a DVCS?" I can't predict the future, but I do think DVCS is fundamentally superior. Joel Spolsky called it "possibly the biggest advance in software development technology in the ten years I’ve been writing articles here." ( http://www.joelonsoftware.com/items/2010/03/17.html ) Let me describe a key we…
DVCS eliminates this painful choice. Commit as often as you like on your local repo I use Subversion or CVS. When I'm coding on a team, we're usually working on a branch of the code. Additionally, I'm typically working on my own branch of that branch, which is my own sandbox. I check in whenever it makes any sense. My only rule is that the code must compile. When I reach a point where I want my peers to receive my co…
Instead of copying files or some other manual filesystem manipulation to swap between lines of development you're using a tool to help you. Once you're free to branch around as you wish you can get even partial ideas into code - they don't block anything by not being complete.
Then you can clean up this dev rambling into the public commits you want everyone else to see - usually the whole side-project in a couple of larger (and often out of original order) commits. Here is where you make sure the tests are successful at each commit, that you reference bug numbers, write decent commit messages, etc.
And you can do this without anyone needing to know or help with anything until you finally have nice clean commits based off of the current tree and they get imported as nice atomic chunks. You can either ditch your ugly dev commits, or keep them without it getting in the way if you're a history junkie.
tl;dr Instead of a flat directory as your sandbox you've got a full VCS at your disposal.
Re: PHP will switch to git
#106Earlier quoted context omitted.
DVCS eliminates this painful choice. Commit as often as you like on your local repo I use Subversion or CVS. When I'm coding on a team, we're usually working on a branch of the code. Additionally, I'm typically working on my own branch of that branch, which is my own sandbox. I check in whenever it makes any sense. My only rule is that the code must compile. When I reach a point where I want my peers to receive my co…
Your dev tree doesn't have to be always working so you can clean your commits later, you can commit much more often. Instead of using the VCS just for final collaboration you're now much more mobile. In a centralized VCS check-ins and branching are the sorts of things that risk breaking tests and require your team's awareness. With a DVCS you're the only one using it and can check-in every minute if you want, have al…
Huh? Branching code in no way affects the code that has been branched.
Instead of a flat directory as your sandbox you've got a full VCS at your disposal
I don't get it. I can make as many branches in Subversion as I want. It's pretty common for me to have a couple of active branches off the same parent, as I try a couple of different approaches to a problem.
So far, the only advantage I see to Git is the ability to make offline commits (presumably they sync when I have a network connection). But that's only an advantage in my hypothetical future where I'm developing code as I travel around the world.
Re: PHP will switch to git
#107Earlier quoted context omitted.
Your dev tree doesn't have to be always working so you can clean your commits later, you can commit much more often. Instead of using the VCS just for final collaboration you're now much more mobile. In a centralized VCS check-ins and branching are the sorts of things that risk breaking tests and require your team's awareness. With a DVCS you're the only one using it and can check-in every minute if you want, have al…
In a centralized VCS check-ins and branching are the sorts of things that risk breaking tests and require your team's awareness Huh? Branching code in no way affects the code that has been branched. Instead of a flat directory as your sandbox you've got a full VCS at your disposal I don't get it. I can make as many branches in Subversion as I want. It's pretty common for me to have a couple of active branches off the…
Usually it requires a repo admin - hence "team awareness".
> So far, the only advantage I see to Git is the ability to make offline commits
That's more important than you imagine. It also means nothing takes longer than a few seconds - branching, diffing, committing...
> I don't get it. I can make as many branches in Subversion as I want.
But you can't do it offline. You can't even check-in without the central server, let alone make and use branches, merge them, share them with another dev, etc.
When you're offline you aren't using a VCS at all.
> presumably they sync when I have a network connection
Hah, no. That's half the fun.
Re: PHP will switch to git
#108Earlier quoted context omitted.
OTOH, bitbucket has free private hosting and git doesn't (AFAIK). I think that is a crucial point for a beginner who is just learning to code and doesn't want to a) pay money, or b) have his ugly code be visible to the world.
Don't be afraid to show your code to the world. Better yet, paste some in a pastebin and ask for tips in an IRC channel: it'll make you a better developer.