News for hackers. Stuff that matters.
Re:Git tips to stop you getting fired by gte910h on Monday April 08, 2013 @10:25AM (#5511829)
You should be using file backup on any system with code on it. It is so cheap to do this today, it is a no brainer. Apple Time Capsule, Crashplan Pro, etc.
Re:Git tips to stop you getting fired by nathan_long on Monday April 08, 2013 @10:34AM (#5511901)
The only non-replacable thing on my development machine is the code. It makes more sense to me to always push my feature branches up to the server, which is backed up, than for each dev machine to be backed up separately.
Re:Git tips to stop you getting fired by gte910h on Monday April 08, 2013 @01:25PM (#5513076)
Why don't you then just backup your dev machine's code directories to another machine?

Backup is good because it's automatic. Saving somewhere else is nice too, but it's not really backup.

Re:Git tips to stop you getting fired by lmm on Tuesday April 09, 2013 @02:54AM (#5516791)
It'd be more effort for no gain - and it would encourage me to keep changes locally, which is bad for collaboration.
Re:Git tips to stop you getting fired by gte910h on Tuesday April 09, 2013 @01:20PM (#5519562)
Thrashing the index with half completed features is ALSO bad for collaboration.
Re:Git tips to stop you getting fired by lmm on Tuesday April 09, 2013 @01:51PM (#5519776)
It's good that my colleagues can see what I'm working on. It's not going to slow them down when they don't want it to, since git only fetches those branches you ask it for. So no, I have to disagree.
Re:Git tips to stop you getting fired by Davertron on Monday April 08, 2013 @12:14PM (#5512596)
If you rebase a lot, then you want to avoid pushing code constantly until you get it where you want it.
Re:Git tips to stop you getting fired by philsnow on Monday April 08, 2013 @04:27PM (#5514336)
So push to a remote feature branch that is named after your username, then rebase the changes in that feature branch onto the 'trunk' branch and push the result ?

The D in DVCS is all well and good, but there are business reasons for having a canonical store of all source materials.

Re:Git tips to stop you getting fired by jimktrains2 on Monday April 08, 2013 @12:48PM (#5512828)
One of the many reasons not to rebase code that's been pushed already.
Re:Git tips to stop you getting fired by Davertron on Monday April 08, 2013 @02:01PM (#5513368)
As far as I know there's only one reason not to rebase code that's been pushed.

My point was that pushing constantly as a backup mechanism isn't an option if you intend to rebase frequently (unless you're the only developer on the project).

Re:Git tips to stop you getting fired by X-Istence on Monday April 08, 2013 @02:14PM (#5513460)
I have a personal clone of whatever project I am working on, any branches that I publish can be changed at any time using a push -f.
Re:Git tips to stop you getting fired by nathan_long on Monday April 08, 2013 @03:53PM (#5514083)
Depends on your team. I'm on a small one, and I often rebase and force push a branch I'm working on, because I know nobody else is working on it.
Re:Git tips to stop you getting fired by philjackson on Monday April 08, 2013 @10:47AM (#5511974)
I suppose if you were really paranoid you could use 'git archive' to snapshot to dropbox.
Re:Git tips to stop you getting fired by sneak on Monday April 08, 2013 @11:38AM (#5512357)
All of my git repos live in a subdirectory of my dropbox as-is. I also compulsively push to remote. I also use Time Machine. I also rsync my home directory to an external drive in case Time Machine implodes. I also rsync my home directory to a server in another hemisphere.

Come at me, bro.

Re:Git tips to stop you getting fired by eli on Monday April 08, 2013 @01:55PM (#5513316)
It's been a while, but storing .git files in Dropbox didn't work out so hot for me. Make changes in two places and Dropbox resolves the conflict by renaming one file to "X (Eli's Conflicted Copy)".... Git really doesn't expect to see it's internal files renamed like that.
Re:Git tips to stop you getting fired by sneak on Monday April 22, 2013 @11:54AM (#5589920)
The question then becomes "Why do I need more than one computer accessing git when computers now weigh 1kg?"
Re:Git tips to stop you getting fired by imissmyjuno on Monday April 08, 2013 @11:50AM (#5512435)
The last point is a great idea. I've had my NAS Time Machine backup get corrupted and TM forcing me to redo a full backup a few times now to the point of me abandoning it entirely..
Re:Git tips to stop you getting fired by ryanpetrich on Monday April 08, 2013 @11:38AM (#5512356)
Pushing to dropbox is a very common part of my workflow: https://github.com/rpetrich/git-dropbox It's not strictly safe to use from multiple machines, but as a simple backup it's very convenient.