+1 vote
in Git by

Q. You need to update your local repos. What git commands will you use?

1 Answer

0 votes
by

It’s a two steps process. First you fetch the changes from a remote named origin:

git fetch origin

Then you merge a branch master to local:

git merge origin/master

Or simply:

git pull origin master

If origin is a default remote and ‘master’ is default branch, you can drop it eg. git pull.

Related questions

+1 vote
asked Jul 25, 2019 in Git by SakshiSharma
0 votes
0 votes
asked Oct 26, 2020 in Git by AdilsonLima
...