3 ms·
So, this is something i worry about. I'm using time machine for backups, so i don't think i'll lose much ... but i'm sorta hazy about how i should be using svn
by jfoutz 15y ago
So, this is something i worry about.
I'm using time machine for backups, so i don't think i'll lose much ... but i'm sorta hazy about how i should be using svn for all these little incremental steps. I'm uncomfortable with committing code that's going to break the whole system.
Should i be creating a branch for projects longer than an afternoon, and just committing that fairly often? I feel like eclipse's history is working okay but i have a vague paranoia i'm doing something dumb when i see comments like this.
- deleted 15y ago[deleted]
- vegashacker 15y agoWith SVN, probably, but the branching just feels heavyweight so sometimes it's hard to motivate. Git with the "git flow" addon seems like it'd be a better fit for you. Being able to checkin in "to your feature", as opposed to waiting till it's done and ready, feels great. It's also not just about avoiding data loss. If your feature starts going off-course or has a bug, you can look at previous revisions to get fixed up.
- jdludlow 15y agoThe major workflow shift that involves the skies parting and mana floating down from heaven when you switch to a DVCS (git, hg) is the ease and lightweight nature of branching. Having used git for four years, I now feel absolutely filthy if I'm not coding on a branch. If I start coding anything, I make a branch first, because the overhead is nearly zero, if I screw something up I can easily revert, and the downside of being scared to push code is too great. Example: Yesterday I started a new feature. Step 1 was to branch from our develop branch. A bit into the coding I realized that this feature was going to take longer than expected. I committed what I had on my branch and pushed it to the remote repository (github in this case). This affects no one else, because the code is on a branch. What really makes this possible is that merging is so easy. Branching and merging in svn was scary. I was never sure if something horrible was about to happen. With git (and hg) branching and merging is the expected behavior, and it's easy. Always being on a branch also makes it easier to deal with interruptions. "Hey, there's an emergency, can you fix Foo?" No problem, commit what you have on your branch (or use `git stash` which is amazing) and jump back to the branch that has the code you need to fix. Need that fix in your branch as well? You can merge or simply `git cherry-pick` a single commit across branches. You no longer have to worry about the dreaded "Did I already merge this? What if I merge it again, what will happen?"
- Splines 15y agoThis. A thousand times this. I use perforce for my daily work, and all too often I'll get to a stopping point and think to myself that my approach isn't working - usually I'll wrap my stuff up in a changelist and save the diff off to a file. Then I need to revert to latest and start my work from there. It's not hard, but it's slightly painful, because if I wanted to try different approaches I end up having dpks lying around on my disk which have no easy relation to what they contain. I've been tempted to install Hg and use it's branching mechanisms on top of perforce, but I'm not so sure my workplace would condone that (plus, Hg + perforce may not play well - I'm not sure).
- excoder 15y agoUm ... you might want to try `p4 help shelve` first. Shelved changelists are basically the same as a "git stash" - but they're stored on the server, so other developers on your team can review a changelist before you actually submit it. One of my favorite Perforce features, actually.
- stottc 15y agoChangelists are a feature I really miss in other source control. It's nice to be able to keep orthogonal changes separate
- danssig 15y agoAs others have pointed out: you're using a tool that makes you not want to commit very often. Change to a tool that doesn't have this problem, there are nice ones out there now.
- Turing_Machine 15y ago"I'm using time machine for backups, so i don't think i'll lose much" Time Machine is great, but as others have mentioned that may not help if the building catches on fire. It's good to also have your stuff backed up at a different location, preferably in a different time zone. :-) Edit: Like others, I use DropBox for stuff that doesn't really warrant a full-blown source control system. It's very easy to just right-click, compress, then copy the zip to the DropBox folder.