Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git - Preserve Work Without Commit

Tags:

git

I'm a newbie in git world, i want to ask how to solve my workflow problem, basically I have 2 computer, one in office and one in home, and I'm also have a vps working as my git shared repository. When I work at office, I have unfinished code, and I want to continue my work at home, so usually I'll commit first at office and push my work into git shared repository, and after that I'll pull back at home and continue it.

But sometimes, I just didn't straight go home, and in the meantime, one of my co-worker, pull the code and work with it, and he just yell at me because I committed broken code. So my question is, how do I change computer without committing but I still get my unfinished work ?

like image 709
gkrdvl Avatar asked Feb 09 '10 10:02

gkrdvl


1 Answers

Do all your work on your own branch, let your coworker know not to pull from that branch. This could get messy if you've got lots of developers, but with only two people it shouldn't be a problem at all.

like image 68
kubi Avatar answered Oct 06 '22 01:10

kubi