Reputation: 621
I cloned a repository from GITHUB onto my local machine. And then I made a few direct commits to the GITHUB copy itself. Now I want to sync my local copy with the remote one. How should I proceed?
Upvotes: 2
Views: 53
Reputation: 1422
To get the code from the remote repository:
git pull origin master
To send code to the remote repository:
git push origin master
In both commands:
origin
is the remote (git remote -v
)master
is the remote branch to get/send code of/toYou may get some divergences between the local and the remote code. Putting back the code back together is called a merge, sometimes it is done automatically (as often as possible) sometimes you will need to do it manually but this is another problem.
Upvotes: 1