github upload your own local project

Original Address: https://blog.csdn.net/ivan_1412/article/details/81188959

Original Address: https://blog.csdn.net/ivan_1412/article/details/81188959

Original Address: https://blog.csdn.net/ivan_1412/article/details/81188959

 

As a developer, write a blog, upload to github project does not seem to be a skill, a lot of experienced older drivers will so advise you. This baby for the first time put the project spread to github when a bit deceived, what the hell, it is necessary to pass a thing so difficult?

git gui is there, but a search online, a lot, where the baby is also relatively easy to introduce a relatively large number of people using the gui, called the Source Tree, we all go online to download the next quickly, and today the baby to say is use the command line to upload code, there is a very large wood? It is time to install the wave b.

According to first create a warehouse operation in the figure below, which is doing? It can be understood as a simple and crude project a warehouse on the line.

Once created to see the figure below, the first address this figure to remember, but to use it for a while, this is the address of the warehouse, we want to spread the project here.

 

Then went to download a git, git can download online search, there are many tutorials posted here baby official Download: https://git-scm.com/downloads/     also find an online installation tutorial: HTTP: //jingyan.baidu.com/article/7f766dafba84f04101e1d0b0.html

Then open the installation path Git, open the git-bash.exe, then you will find open a command-line fight something.

Is this stuff, we are here is to write the command line.

Baby items on J: \ MVPDemo \ MVPDemo, our first step is to enter the directory, cd is used to access a directory, the word is white baby play (in front of the dollar sign is automatically generated) now and then entered the directory path we want to upload.

Step git the init input, as shown below, this means that the generation of local management git project in the current directory (.git be found in a folder in the current directory)

第三步输入git add.,这个是将项目上所有的文件添加到仓库中的意思,如果想添加某个特定的文件,只需把.换

成这个特定的文件名即可(加上空格)。

 

第四步输入git commit -m "first commit",表示你对这次提交的注释,双引号里面的内容可以根据个人的需要

改。

第五步输入git remote add origin https://自己的仓库url地址(上面有说到) 将本地的仓库关联到github上,

这里宝宝输入的是git remote add origin https://github.com/SilasGao/MVPDemo.git

最后一步,输入git push -u origin master,这是把代码上传到github仓库的意思。

执行完后,如果没有异常,会等待几秒,然后跳出一个让你输入Username和Password 的窗口,你只要输入

github的登录账号和密码就行了。

   

 

账号密码都正确的话,会看到下面这么一个东西,进度还会跳,这个是上传过程中的进度,这个过程可能有点慢,有时候得等个10几分钟,这时候去github上面看,还是什么都没有的,所以大兄弟别着急,先做点其他的事,晚点再来看看。

上传成功后,就是这个样子了。

希望本文可以帮助到各位哦

Guess you like

Origin blog.csdn.net/qq_41074373/article/details/89312337