项目托管到github

一、.gitignore文件

忽略文件:会忽略该文件中的

node_modules
.idea
.vscode
.git

  

二、README.md  文件

 

三、LICENSE  文件

主流来源协议

The MIT License (MIT)

Copyright (c) 2014 connors and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 

四、git的工作区

git仓库:最终确定为文件保存到仓库,成为一个新的版本,并且对他人可见

暂存区:暂存以及修改的文件,最后统一提交到git仓库

工作区:添加、编辑、修改文件等操作。

 

基本工作流程:

            git add                               git commit

工作区-----------------------》暂存区-------------------------》仓库

 

五、初始化

1、初始化   git init

2、查看状态: git status

3、将文件放到暂存区:git add .   

  .  表示所有的文件

  当只操作一个文件时,后面跟上对应的文件名

4、提交文件:git commit -m "init my project"  

  这只是提交到了本地

5、在GitHub上创建一个空仓库之后

  git remote add origin https://github.com/1220x/vue-cms.git

6、提交到远程仓库

  git push -u origin master

 

六、使用vscode默认集成的git工具提交代码(可视化)

 

 

posted @ 2019-10-22 09:15  1220x  阅读(144)  评论(0编辑  收藏  举报