2

For instance:

I have a local repo branch 'master', and a remote repo branch 'r-master' with a directory 'dir1', I'd like to push 'master' to 'r-master/dir1' and making 'master' to keep track of 'r-master/dir1', is that possible?

1 Answers1

0

Branches and directories are two separate concepts in Git (as oppose to SVN where directories represents branches or tag: See "Git - Store branches in separate local directories").

So you can push master to r-master, but not to r-master/dir1

git push -u origin master:r-master

(with -u or --set-upstream if you need tracking: see

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