Reputation: 89
I have a directory named "SAMPLE" for version control located in the remote server, How can I checkout "SAMPLE" to a specific directory in my local computer?
Upvotes: 2
Views: 1368
Reputation: 8730
It depends on how you access files on your remote server (ftp, sftp, ssh, http, etc.).
Generally, you would use either bzr branch
or bzr checkout
to get a copy. bzr branch
will allow you to perform local commits and only push them to the remote server when you're satisfied, while bzr checkout
will directly commit to the remote server. You can use bzr unbind
and bzr bind
to convert between checkouts and branches.
For example, assuming that you have the SAMPLE directory on the remote server in your home directory, that the server is named server.com
, and use sftp to access it, you can use one of:
bzr branch sftp://server.com/~/SAMPLE MYSAMPLE
bzr checkout sftp://server.com/~/SAMPLE MYSAMPLE
to obtain a local copy in the MYSAMPLE subdirectory of your current directory (obviously, you can specify a different directory name for the destination, too.
If you don't use sftp, you can consult bzr help urlspec
to find out what other prefixes are available.
If the file isn't in your home directory, but uses an absolute path, you will have to insert that instead, as in the following examples:
bzr branch sftp://server.com/path/to/SAMPLE MYSAMPLE
bzr checkout sftp://server.com/path/to/SAMPLE MYSAMPLE
bzr branch http://server.com/path/to/SAMPLE MYSAMPLE
bzr checkout http://server.com/path/to/SAMPLE MYSAMPLE
If you need more information about the difference between the branch
and checkout
commands, bzr help branch
and bzr help checkout
should tell you what you need.
Upvotes: 1