-1

From my remote repository i am cloning a particular branch using

git clone <URL> -b <branch_name> --single-branch <local_copy_1> 
git clone <URL> -b <branch_name> --single-branch <local_copy_2>

I clone multiple copies of the same branch in my local system.Now how to i do push,fetch,merge or pull w.r.t to each local copies?

1 Answers1

0

You would push it normally, but each repo needs first to synchronize itself with the latest commits pushed on that branch (pushed from the other cloned repo for instance):

git pull --rebase
git push

Note that with Git 2.5 (released next week), you will be able to have multiple working tree (meaning multiple checked out branches, including the same one) for one cloned repo.
See "Multiple working directories with Git?".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250