install git:

access this page: https://git-scm.com/downloads
image.png
download a git install pack of the right version that fits your system.

git environment components:

refer the answer of “Abizern” in stackoverflow: https://stackoverflow.com/questions/4492979/git-is-not-recognized-as-an-internal-or-external-command

Modifying PATH on Windows 10:

  1. In the Start Menu or taskbar search, search for “environment variable”.
  2. Select “Edit the system environment variables”.
  3. Click the “Environment Variables” button at the bottom.
  4. Double-click the “Path” entry under “System variables”.
  5. With the “New” button in the PATH editor, add C:\Program Files\Git\bin\ and C:\Program Files\Git\cmd\ to the end of the list.
  6. Close and re-open your console.

Modifying PATH on Windows 7:

  1. Right-click “Computer” on the Desktop or Start Menu.
  2. Select “Properties”.
  3. On the very far left, click the “Advanced system settings” link.
  4. Click the “Environment Variables” button at the bottom.
  5. Double-click the “Path” entry under “System variables”.
  6. At the end of “Variable value”, insert a ; if there is not already one, and then C:\Program Files\Git\bin\;C:\Program Files\Git\cmd\. Do not put a space between ; and the entry.
  7. Close and re-open your console.

synchronization:

before you push, you need:

  1. a github account
  2. a corresponding project
  3. there are no files in the directory of that Github project that are not in your directory (Git ⊆ Yours)

  4. get into the right directory position

  5. initiate git directory

    1. git init
  6. add all files under the current directory into the adding list

    1. git add .
  7. commit the adding list, “layout” here is comment

    1. git commit -m "layout"
  8. use the repository on the github page

image.png

  1. git remote add origin [web URL]
  1. push
    1. git push origin master