How to synchronize github?

3

I made some changes to a project of mine that was in GitHub, now I want to synchronize it with my local repository and continue editing, how do I do that?

    
asked by anonymous 22.12.2016 / 00:10

2 answers

3

In your local directory (assuming you already have the same project cloned locally with 'git clone') just do

git pull

This command synchronizes the local directory by pulling everything back from the remote directory.

If you have made local changes that do not matter, you can do

git stash
git pull

Note: 'git stash' temporarily saves changes 'on the shelf' if you want to use them later.

    
22.12.2016 / 16:07
3

If you have not cloned your remote repository to your local machine, do the following in the terminal directory in the directory where you want to save

git clone <url do repositório remoto>

If you have already cloned the repository to pull the changes from the remote to the location.

git pull origin master
    
22.12.2016 / 01:07