简体   繁体   中英

How can i pull selected files from git repo

I have the git repo with folders like

|-ear
   |-ejbs
   |---src
   |-----main
   |-------resources
   |---------META-INF
   |-primary-source
   |-projects
   |---logging
   |-servlets
   |---servlet
   |-----src
   |-------main
   |---------webapp
   |-----------WEB-INF
   |-src
   |---main
   |-----resources

This is in git repo on bitbucket

However for other project i only want to have folder structure like

|-ear
   |-main
   |-resources
   |-projects --only some files

So that when i use git pull then those files folder gets updated from that repo

You can't.

If you only need a subset:

  • clone the original repo
  • drop files you don't need
  • commit what's remaining.

Or, if you're not interested in the history, just create a fresh repo and pick the files you need from ear into your fresh repo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM