Git notes (2): Checking out a branch

Continuing from other notes here.

To checkout a branch:

Clone a repo:

git clone user@server:reponame.git

Fetch all branches:

git fetch remote_name

List all available branches:

git branch -v -a

Checkout required branch:

git checkout -b branch_name remote_name/branch_name

Fetch all changes on branch:

git fetch

 

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.