Updating a local repository with changes from a GitHub repository
I've got a project checked locally from GitHub, and that remote repository has since had changes made to it. What's the correct command to update my local copy with the latest changes?
Solution 1:
Probably:
was: git pull origin master
now: git pull origin main
Solution 2:
This should work for every default repo:
git pull origin master
If your default branch is different than master
, you will need to specify the branch name:
git pull origin my_default_branch_name