minte9
LearnRemember



Remote origin

Add a remote origin to local repository.
 
git remote add origin https://github.com/myusername/testgit.git
Push force local change} to ORIGIN repo (on GitHub)
 
git push --force origin master 
Get changes from remote repository (from GitHub)
 
git pull origin master

Github example

Public repositories are free. Private repositories were available for paid accounts, now free :)
 
cd d/myuser/testgit/

git init
git remote <span class='keyword_code'>add origin</span> https://github.com/myusername/testgit.git
git pull origin master

git commit -a -m "my changes"

$ git <span class='keyword_code'>push</span> origin master
    # Username for 'https://github.com': myusername
    # Password for 'https://myusername@github.com':



  Last update: 297 days ago