Upload the project to github using git

Reprinted: https://www.cnblogs.com/cxk1995/p/5800196.html

First of all, you need a github account, if you don't have one, go to register first!

https://github.com/

To use git, we need to install the git tool first. The download address is given here. After downloading, you can directly install it all the way:

https://git-for-windows.github.io/

1. Go to the Github homepage and click New repository to create a new project

 2. Fill in the corresponding information and click create 

Repository name: repository name

Description (optional): Description of the warehouse

Public, Private : repository permissions (public sharing, private or designated collaborators)

Initialize this repository with a README: Add a README.md

gitignore: repository type that does not require version management, corresponding to the generated file .gitignore

license: certificate type, corresponding to the generated file LICENSE

 

4. Click Clone or dowload and an address will appear, copy this address for backup.

5. Next, go to the local operation. First, right-click on your project. If you installed git successfully before, there will be two new options on the right-click, Git Gui Here, Git Bash Here, here we choose Git Bash Here, enter In the following interface, Test_Bluetooth is my project name.

6. Next, enter the following code (key step) to clone the repository on github to the local

git clone https://github.com/CKTim/BlueTooth.git (replace https://github.com/CKTim/BlueTooth.git with the address you copied earlier)

 7.这个步骤以后你的本地项目文件夹下面就会多出个文件夹,该文件夹名即为你github上面的项目名,如图我多出了个Test文件夹,我们把本地项目文件夹下的所有文件(除了新多出的那个文件夹不用),其余都复制到那个新多出的文件夹下,

8.接着继续输入命令 cd Test,进入Test文件夹

9.接下来依次输入以下代码即可完成其他剩余操作:

git add .        (注:别忘记后面的.,此操作是把Test文件夹下面的文件都添加进来)

git commit  -m  "提交信息"  (注:“提交信息”里面换成你需要,如“first commit”)

git push -u origin master   (注:此操作目的是把本地仓库push到github上面,此步骤需要你输入帐号和密码)

 

 


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324845294&siteId=291194637