search

Home  >  Q&A  >  body text

About git pull

For example, there are two folders a and b. They are both in the same directory. When I pull the remote code in folder a, the remote code in folder b will also be pulled down. Why is this happening

PHP中文网PHP中文网2806 days ago706

reply all(4)I'll reply

  • 天蓬老师

    天蓬老师2017-05-02 09:51:34

    According to your situation, folder a and folder b should be in the same warehouse. When pulling the code, the latest one in the warehouse will be taken, instead of only partial directories;

    reply
    0
  • 高洛峰

    高洛峰2017-05-02 09:51:34

    git is the warehouse manager. If your git repository is only in the a folder, then when you pull the code, you can only get the code in the a folder.

    Judging from the problem you described, your warehouse should be in a folder other than a and b, so of course when you pull the code, b will be pulled down.

    If you really don’t want to pull b’s code, just add b to .gitignore and that’s it

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-02 09:51:34

    I remember reading the introduction in the git quick start, you can go find it yourself

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-02 09:51:34

    Pull seems to be pulling the entire git project directory, rather than pulling a certain directory within it.

    reply
    0
  • Cancelreply