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

  • SEARCH
  • Home
  • 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 8411095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:21:13+00:00 2026-06-10T00:21:13+00:00

Is it possible to pull from a remote repository but only selectively take files

  • 0

Is it possible to pull from a remote repository but only selectively take files from that remote that I’m interested in? I don’t want to simply pull down the entire branch.

Thanks.

  • 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-10T00:21:15+00:00Added an answer on June 10, 2026 at 12:21 am

    A “remote branch” is nothing more than a commit pointer and the affiliated pack data. Just git fetch <remote> and then if you want to view diffs between files on the remote and your local, you can do so with:

    git diff <local_branch> <remote>/<remote_branch> -- <file>
    

    This would in many cases be, for example, git diff master origin/master -- <file>. You could also see the commit differences with git log:

    git log <local_branch>..<remote>/<remote_branch> -- <file>
    

    so… git log master..origin/master -- <file>

    Finally if you just want to checkout a particular version of a file from the remote (this wouldn’t be ideal; much better to merge the remote branch with git merge <remote>/<remote_branch> or git pull), use:

    git checkout <remote>/<remote_branch> -- <file>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to determine that I can safely pull from a new remote
Is it even possible? Basically, there's a remote repository from which I pull using
Possible Duplicate: PHP Curl script to pull data from remote server every 10 minutes
Is it possible to pull photos from the Flickr API based on a search
Is it possible to pull a specific playlist from Spotify with JS and return
Possible Duplicate: git - removing a file from source control (but not from the
Possible Duplicate: Using Git how do I find modified files between local and remote
I want to set up a parameterized build in Hudson that only takes one
I don't know much how to use rebase, but it seems the rebase only
I have a public repository on github that I'm having trouble handling pull requests

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.