LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Can git checkout a single file in a unique directory? (https://www.linuxquestions.org/questions/programming-9/can-git-checkout-a-single-file-in-a-unique-directory-773566/)

gctaylor1 12-04-2009 07:16 PM

Can git checkout a single file in a unique directory?
 
Will git allow me to checkout a file(or files) to specific directories that is/are different from the main repository and still have the "different" files be under version control?

Here's my example(using svn now): I have a main repository where I have the bulk of the files checked out. Some files within my repository have to be in specific directories in order to run.

Right now with svn I have to keep copying files back and forth in order to either run the file or have the files be under version control. It's getting old and causing me to not use version control properly. According to this link http://subversion.tigris.org/faq.htm...-file-checkout svn cannot do this.

I was thinking I'd switch to git if it can do this but I can't seem to find this answer for git.

Thanks.

sundialsvcs 12-04-2009 09:35 PM

Git works on a directory level. Or higher.

You can work with individual files, but let's face it: you've got hundreds of "individual files," and trying to keep them all marching in step individually is a PITA if you have to worry about them individually.

Git is very definitely designed for use by developers who are, for example, exchanging their updates by e-mail. People who are working on all parts of the planet: when they're sleeping in their particular time zone of choice, someone else is always awake.

You'll either love it or you won't. It's either the cat's meow for you, exactly what you want, or not what you want at all. IMHO, it is so very targeted for one particular usage scenario that there really there is no in-between.

ntubski 12-05-2009 08:19 AM

Quote:

Originally Posted by gctaylor1
Here's my example(using svn now): I have a main repository where I have the bulk of the files checked out. Some files within my repository have to be in specific directories in order to run.

Right now with svn I have to keep copying files back and forth in order to either run the file or have the files be under version control.

Why don't you put a symlink in the directory for running to the directory where it sits now. I believe both SVN and git support symlinks.


All times are GMT -5. The time now is 12:49 PM.