Despotars
Despotars

Reputation: 571

how to create a branch from a remote master in SourceTree?

I have a git master in my SourceTree, and I want to create a branch on another computer. How I can do this? (Master = Remote, in the same network)

Upvotes: 4

Views: 24332

Answers (2)

Gorodeckij Dimitrij
Gorodeckij Dimitrij

Reputation: 4636

On another machine connect SourceTree to master (clone)

Then with shell navigate to project folder and run such:

git branch -r (will show all remote branches)

git checkout --track origin/[branch name]

repeat checkout for all branches - SourceTree will get them almost immediately

Upvotes: 1

griffon vulture
griffon vulture

Reputation: 6774

Create the branch locally

git checkout -b branch_name

And then push to remote

git push -u remote-name branch-name

Then in the remote

 git pull branch-name

And it will automatically be created locally.

Upvotes: 8

Related Questions