Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating a local repository with changes from a GitHub repository

Tags:

git

github

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?

like image 479
Tom Avatar asked Sep 18 '09 08:09

Tom


People also ask

What command is used to update a local repository with changes from a remote repository?

The git pull command is used to fetch and download content from a remote repository and immediately update the local repository to match that content. Merging remote upstream changes into your local repository is a common task in Git-based collaboration work flows.

When you run git fetch from your local repo it will update your local changes in working area?

Answer. When you fetch you get the remote branches, but you still need to merge the changes from the remote branch into your local branch to see those changes.


1 Answers

Probably:

was: git pull origin master

now: git pull origin main

like image 83
James Healy Avatar answered Oct 04 '22 02:10

James Healy