2

I am using git-new-workdir script to manage my branches but the branch apparently do not synchronize automatically. I have a repo with three branches (master, branchA and branchB). First, I cloned the repo with:

git clone git://myreposite.com/project.git

Second, I use git-new-workdir to split my branches

git-new-workdir project branchA branchA
git-new-workdir project branchB branchB

Now I have project, branchA and branchB directories. Suppose someone else also had cloned my repo from other computer and checked out branchA, modified a file, committed and issued a git push --all.

Thus, now I have to updated my branchA. So, I issue a git pull --all from master branch directory and I would expect that all my branches got updated instantly, but they didn't. When check the modified file on branchA directory nothing changed.

What am doing wrong?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • 2
    Note that Git 2.5 will replace `git-new-workdir` with `git checkout --to=`. See http://stackoverflow.com/a/30185564/6309 – VonC May 12 '15 at 08:42

1 Answers1

3

That’s not how it works. While you have multiple working directories, they are not automatically updated when the checked out branches are updated. You have to do that manually yourself.

poke
  • 369,085
  • 72
  • 557
  • 602