Eslam Zedan
Published in : 2022-03-03
Somebody pushed a branch called release
with git push
our repository.
Now I'm trying to check out to release
branch.
I've tried:
git checkout release
which does nothing
git checkout origin/release
gives * (no branch)
.
How do I check out a remote Git branch?
Join our community and get the chance to solve your code issues & share your opinion with us
Sign up Now
Shilpa Date : 2022-03-03
Best answers
10
Best answers
10
You can fix the issue by the below command.
This will fetch your remote branch
It will also create a new local branch by name “your_local_branch_name” (if it is not existing)
Here you can track the remote one in it.
– – – –
To checkout local code, you can use below commands,
It will work for you.