Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8580857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:54:57+00:00 2026-06-11T20:54:57+00:00

So I decided to install the Windows version of Git locally (I do Unix

  • 0

So I decided to install the Windows version of Git locally (I do Unix web dev but also .NET dev, so seems circuitous to run Git on UNIX for my .NET projects).

For the web development work I’ll just deploy it myself with FTP, but wanted to ask: is there any convenient way to have Git build a directory structure for a subset of files, such as all the files in a particular branch?

For example: say I have this web server file structure

/public_html/index.php
/public_html/config.php
/public_html/style/style.css
/public_html/style/typography.css

locally I modify only index.php and style.css

it would be nice if there was some way to “checkout” these files and have it build their full file paths. In Visual Source Safe, it actually stores all your files in the VSS database. So you can delete you working copy, and checkout a few files, and it will write them to your working directory in their appropriate directory structures. Is there something like that in GIT? if so then I could just export the modified files and upload the root folder (/public_html) to the server

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:54:58+00:00Added an answer on June 11, 2026 at 8:54 pm

    Check out git diff-tree. You can use it compare the state of two commits’ trees and determine what files have changed. For example:

    git diff-tree --name-status -r `git merge-base master mybranch` mybranch
    

    will show you the name and status of any files that have changed. You can also use --name-only instead of --name-status if you are sure that things like deleted files will still be handled correctly.

    (Of course, command substitution with “ is a UNIX-shell construct; on Windows you may need to use something like FOR /F.)

    You can then pass the files listed by this command to git checkout. If you want to check files out into a separate directory, you can use the --work-tree parameter:

    git --work-tree=path/to/build checkout mybranch -- file file file...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know how to use php-markdown by loading it manually, but decided to install
I decided not to use an orm and going to use straight ADO.NET for
I've got git installed on my mac and either forgot or decided not to
I'm developing simple Windows Service sending and receiving data from remote web service. I
I have the Indigo version. When I go to Help > Install New Software,
We have decided to take the plunge and require that our users have .NET
After installing a MSP patch, Windows Installer decides to install ALL Features provided in
Our company's switching from traditional, lame Windows shared drive to a Linux install of
I am very New to Git. My client asket me to install git in
I am new to Ubuntu. Previously I was on Windows and was using git

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.