Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git checkout remote branch

# In order to checkout a remote branch,
# you have to first fetch the contents of the branch
git fetch --all

# In mordern version of Git, cehckout the remote branch like a local branch
git checkout <remotebranch>

# Older versions of Git requiers the creation of a new branch based on the remote
git checkout -b <remotebranch> origin/<remotebranch>
Comment

git checkout remote branch

git checkout --track origin/<branchname>
Comment

git checkout remote branch

# In modern versions of Git, you can checkout the remote branch like a local branch.
git checkout <remotebranch>

# Older versions of Git require the creation of a new branch based on the remote.
git checkout <remotebranch> origin/<remotebranch>
Comment

How do I check out a remote Git branch?

In this case, you probably want to create a local test branch which is tracking the remote test branch:

$ git branch test origin/test
In earlier versions of git, you needed an explicit --track option, but that is the default now when you are branching off a remote branch.

To create the local branch and switch to it, use:

$ git checkout -b test origin/test
Comment

how to checkout a remote branch in git

$ git checkout -t remote_name/remote_branch
Comment

git get remote branch

git fetch
git checkout test
Comment

how to checkout a remote branch in git

git checkout -t origin/future_branch (for example)
Comment

PREVIOUS NEXT
Code Example
Shell :: git cherry pick many commits 
Shell :: random number in bash 
Shell :: node version manager 
Shell :: deploy docker to heroku 
Shell :: linux execute sh 
Shell :: command to start a system service 
Shell :: folium 
Shell :: how to delete an issue on github 
Shell :: microphone auto adjusting ubuntu 
Shell :: wget debian to Downloads 
Shell :: git pull origin main 
Shell :: powershell to connect to remote computer 
Shell :: flutterfire command not found 
Shell :: git reset hard directory 
Shell :: time command windows 
Shell :: ubuntu essential commands 
Shell :: how to make a single digit date start with zero 
Shell :: A server is already running. Check /home/mahi/Desktop/PharmaPlace/tmp/pids/server.pid. Exiting 
Shell :: how to show two table side by side in github readme 
Shell :: open vs code from terminal 
Shell :: Test validator does not look started. 
Shell :: How to install 4k video Downloader YouTube on Ubuntu Linux 
Shell :: Linkar repo en github 
Shell :: print what s in tarball 
Shell :: Installing ruby version manager (rvm) 
Shell :: mkdir: cannot create directory ‘/shared’: Permission denied capistrano 
Shell :: uninstall newrelic amazon linux 
Shell :: redwood login 
Shell :: ubuntu psql: error: FATAL: Peer authentication failed for user 
Shell :: delphes install 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =