svn - Git alias to create a new branch, switch repository and create the same branch there -
i have 2 repositories, our application exists of our basic product, , extended product each client have (i work 1 client, 2 repositories).
when make new branch on basic product repository, want same branch created on extended product repository.
to this, created git alias using:
git config --global alias.newbranch '!git checkout -b $0 central/branchname && cd ../extendedproduct && git checkout -b $0 central/branchname'
when run using: git newbranch test, exception saying ../extendedproduct outside repository.
i'm not sure if want @ possible, appreciated.
so basically: create branch on current repository -> switch repository -> create branch same name on repository.
git alias has restrictions, can use these commands directly, such
git checkout -b central/branchname && cd ../extendedproduct && git checkout -b central/branchname
also, there way, can add extendedproduct submodule current repo git submodule add /path/for/extendedproduct
. , use
git checkout -b central/branchname && git submodule foreach 'git checkout -b central/branchname'
Comments
Post a Comment