Detailed use of Git (uploaded to github)

Reference: Detailed use of Git

First download Git

Insert picture description here

  • Open git bash, or right-click in the project folder to be uploaded and select git bash here
  • First declare your identity (tell git who you are)
git config --global user.name "your name here"
git config --global user.email "your email here"
  • Execute in the project folder
git init
git add . //这个操作是把所有文件添加到暂存区中
git commit -m "提交信息"
  • This will upload the project to the warehouse

Upload the project to your github below

  • First set up a repository on github
  • Copy your warehouse address:
  • Insert picture description here
  • Execute in git
git clone 你的仓库地址
  • After that, there will be an extra folder in your project file, the name is your warehouse name, copy the files in your project to this folder (except this folder), and then the same operation
git add .
git commit -m "提交信息"
git push -u origin master   //(注:此操作目的是把本地仓库push到github上面,此步骤需要你输入帐号和密码)
So you can see your uploaded project in the warehouse created by your github

Guess you like

Origin blog.csdn.net/qq_43567222/article/details/114368452