last version of git code example
Example 1: git
git init
git add .
git commit -m "First commit"
git remote add origin "URL of repository"
git push --set-upstream origin master
Example 2: latest version of git
/ we need to type both of them git fetch origin git reset --hard origin/master