Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update Git clone

Tags:

git

I have started using Git. I have cloned the repo on my local system. I make the changes on the local machine and use git push to the update the remote repo. It works fine.

I have a quick query how to update my clone from the remote. I tried git remote update. It did not work, new changes does not appear. I just want to make sure I have recent copy of the repo before I get to work. How I can update the clone?

like image 729
Josh Randall Avatar asked May 30 '12 11:05

Josh Randall


People also ask

What is git update command?

If you have already installed Git, you can update Git with the command. git update-git-for-windows. to know the current version, use: git --version. You can run these commands in the cmd prompt .


1 Answers

If you want to fetch + merge, run

git pull 

if you want simply to fetch :

git fetch 
like image 129
Gilles Quenot Avatar answered Sep 16 '22 16:09

Gilles Quenot