Reputation: 17586
Hi i have cloned a remote branch to a different server using
sudo ~/gitkey.sh -i ~/.ssh/kan.pem git clone
ssh://[email protected]: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://[email protected]: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
Upvotes: 0
Views: 52
Reputation: 834
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://[email protected]: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://[email protected]:22222/test_adapter remote_branch
Upvotes: 1