Arthur Ulfeldt
Arthur Ulfeldt

Reputation: 91554

can i pull a dirty tree with git?

I have a build system that I use to test the code I am currently working on. I would like the build script to pull the current code as quickly as possible from my workstation's git repo.

I'm looking to quickly pull any changes from origin/master along with any modified files.

Upvotes: 0

Views: 227

Answers (2)

Cascabel
Cascabel

Reputation: 496902

Pretty much by definition, modified files are not tracked. (Uncommitted modifications are, well, uncommitted.) You could certainly directly copy the work tree if you had access, but otherwise, if you want to pull it, you need to commit it. You could commit it to a temporary branch, of course, but somehow it's got to be committed.

Edit: This answer is about pulling with git. If you want to copy files (or copy a diff) as in the OP's answer, you can do that, but the bottom line is that it's an operation requiring filesystem access, not a git remote operation.

Upvotes: 3

Arthur Ulfeldt
Arthur Ulfeldt

Reputation: 91554

first pull the commited changes then pull a diff of the uncommitted changes.

git pull
ssh me@my-dev-box bash -c "cd && cd svn && git diff HEAD /home/aulfeldt/svn" | patch -p1

Upvotes: 2

Related Questions