Wednesday, 4 April 2012

Using GIT

Clone only one branch
git clone git://git-url.git -b branchname

Clone from one repository and push into another
git remote add remote1 remoteurl
git fetch remote1
now you can check all the branches using
git branch -a
Choose the remote of your repo
git remote add origin repourl
git checkout remote1/branchname
git checkout -b branchname
git push origin branchname
you can repeat this with every branch

I am sure there is a better method to this, Please comment if you have , other wise I will post it in a short while

No comments:

Post a Comment