Hi i have cloned a remote branch to a different server using
sudo ~/gitkey.sh -i ~/.ssh/kan.pem git clone
ssh://gitolite3@555.555.55.55:22222/test_adapter -b remote_branch local_folder_server
now i have done some changes to the remote_branch
code from my local machine and committed to the remote_branch
.
now i want to get my changes on remote_branch
to my local_folder_server
.
I tried with
sudo ~/gitkey.sh -i ~/.ssh/kan.pem git pull
ssh://gitolite3@555.555.55.55:22222/test_adapter -b remote_branch local_folder_server
and it is not working.
I checked in the internet for some solutions .but does not understand, i am really new to git , please help me to pull my changes .
Thank you .
UPDATE
when i go inside my local_folder_server
and typed git branch
it will show me *remote_branch
The syntax of git pull
is different from the git clone
command. Normally you should be inside a repository directory ( local_folder_server
in your case) to make pull. Also you don't need to use -b
before branch name. So execute the following command while you in the local_folder_server
:
sudo ~/gitkey.sh -i ~/.ssh/kan.pem git pull
ssh://gitolite3@555.555.55.55:22222/test_adapter remote_branch
Starting from git 1.8.5 you can tell git to go into some directory before executing a command, using the option -C <dir_name>
. Will be like that:
sudo ~/gitkey.sh -i ~/.ssh/kan.pem git -C local_folder_server pull
ssh://gitolite3@555.555.55.55:22222/test_adapter remote_branch
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.