当前位置: 首页 > news >正文

摄影网站设计图片电商培训机构排名

摄影网站设计图片,电商培训机构排名,网络平台推广哪家好,简述网站制作流程图目录 1. Github基本使用方法2. Git使用方法3. git、VS code、Github联合使用方法4. Git配置Github远程仓库SSH密钥5 常见问题 1. Github基本使用方法 仓库(Repository):Github上用来存放代码的空间,包含代码、文档和其他文件。提…

目录

  • 1. Github基本使用方法
  • 2. Git使用方法
  • 3. git、VS code、Github联合使用方法
  • 4. Git配置Github远程仓库SSH密钥
  • 5 常见问题

1. Github基本使用方法

  • 仓库(Repository):Github上用来存放代码的空间,包含代码、文档和其他文件。
  • 提交(Commit):Git是一种版本控制系统,它通过不断提交新的修改内容来记录代码的版本,每次提交称为一次“提交”(Commit)。
  • 分支(Branch):在Git上,每一个代码仓库都有一个主分支(master branch),每个开发者都可以从主分支上创建一个自己的分支Branch),在自己的分支上进行开发,完成开发后再将分支合并到主分支上。
  • 合并(Merge):将分支上的代码或修改合并到主分支或其他分支上。
  • 请求合并(Pull Request):开发者在自己的分支上开发完代码后,将修改请求合并到主分支或其他分支上,请求合并的过程称为“Pull Request”,开源社区的成员可以对请求进行审查和讨论。

主要操作:

  1. 创建仓库:“New Repository”->“Create Repository”;
    在这里插入图片描述

  2. 克隆仓库:直接点击“download ZIP”(下载的只是整个项目文件);或者用git命令" git clone https://github.com/*************.git"(下载的不仅是整个项目文件,还有仓库属性)
    在这里插入图片描述

  3. 上传文件:点击addfile即可或者采用git命令(详情见文章后面)
    在这里插入图片描述

  4. 提交更改(pull request)看到别人仓库的东西,想提出修改意见,可点击“pull request”,上传自己修改过的代码和描述。
    在这里插入图片描述

  5. 提交疑问(Issues):基于查看过代码仓库的前提提交问题和提交说明,仓库创建者有权利关闭问题并和网友评论问题以及添加标签。

  6. README.md文件:这个项目的整体介绍和使用的方法。

  7. License文件:如果你想把这个代码抄到项目中,一定要注意license。如果是MIT这种,就代表你只要保留了原作者的一些版权信息在源代码里,基本上就可以无限制使用,也不用付费。如果有一些奇奇怪怪的LICENSE,既不是MIT也不是Apache软件基金会的那种。就需要和公司法务确认好,以避免不必要的官司和纠纷。

找开源项目的一些途径:

• https://github.com/trending/
• https://github.com/521xueweihan/HelloGitHub
• https://github.com/ruanyf/weekly
• https://www.zhihu.com/column/mm-fe

查找资源的前后缀技巧:

• 找百科大全 awesome xxx
• 找例子 xxx sample
• 找空项目架子 xxx starter / xxx boilerplate 
• 找教程  xxx tutorial

2. Git使用方法

Git是一款分布式源代码管理工具(版本控制工具) ,可以用来合作开发项目,不同阶段提交代码的回溯等等,经常与Github搭配使用。

常用Git命令:

  • 克隆仓库:git clone 地址 ,例如:
   git clone https://github.com/ABC/test.git
  • 初始化仓库:在本地新建一个文件夹,用git bash打开,输入git init,就可以把该文件夹当作一个git仓库使用。
  git init
  • 修改名字和邮箱:第一次使用git的时候,需要设置用户的名字和邮箱。
git config --global user.name "your username" 
git config --global user.email "your email"
  • 将修改或新建文件添加到暂存区:
git add 文件名    //单独添加某个文件到暂存区
git add .           //添加所有修改或新建文件到暂存区
  • commit将暂存区的文件提交到本地仓库中:
git commit -m "提交描述信息"
  • 查看提交的历史纪录:
git log --stat
  • 在工作区(还没有commit)回滚一个文件到初始状态:
git checkout filename
  • 如果已经commit,想撤回:
git reset HEAD^n     //n表示第上n个commit回滚
git reset HEAD^1    //表示撤销最后一次提交
  • 以当前分支为基础新建分支:
git checkout -b branchname
  • 列举所有分支:
git branch
  • 切换到某个分支:
git checkout branchname
  • 删除某个分支:
git branch -D branchname
  • 合并分支:可能会遇到分支合并冲突(例如不同的分支均修改了之前相同文件中的同一地方代码,合并冲突时需要人为解决)
git merge branchname
  • 将本地仓库与远程仓库连接起来:
git remote add origin 远程仓库地址
  • 推送当前分支最新的提交到远程代码库:
git push
  • 拉取远程分支最新的提交到本地:
git pull
  • 将拉取远程仓库内容与本地仓库内容融合:
    git pull --rebase origin master

3. git、VS code、Github联合使用方法

  1. git 和VScode安装完成后,在vscode中安装插件“Gitlens”
    在这里插入图片描述
  2. 用vscode打开项目文件夹。 在vscode终端中添加一个git bash终端,用于输入git命令建立和管理仓库 在这里插入图片描述
  3. 依次进行如下操作:
git init //初始化git add .  //将当前目录下修改的所有代码从工作区添加到暂存区git commit -m  “注释”  //将缓存区内容添加到本地仓库git remote add origin 远程仓库地址  //将本地仓库与远程仓库连接起来git push origin master //将项目推送到远程仓库的master分支上

在推送过程中可能会让你登录Github账号,授予推送权限。有一种用SSH密钥的方法,可以避免每次需要进行GitHub登录验证,如下。

4. Git配置Github远程仓库SSH密钥

  1. 设置本地git账户邮箱和用户名:
git config --global user.name "your username" 
git config --global user.email "your email"
  1. 生成新的SSH密钥:
ssh-keygen -t rsa -C "your email"  //第一次配置连续敲回车即可,如果重新配置 选y再回车即可
  1. 查看生成的密钥:
cat ~/.ssh/id_rsa.pub
  1. 将密钥复制到Github账户的SSH key中,点击add ssh key:

在这里插入图片描述
成功状态如下:
在这里插入图片描述

  1. 之后再用git remote add origin 远程仓库地址 ,将本地仓库与远程仓库连接,就可以直接git push或pull。

5 常见问题

  1. git push或者git pull时,出现连接不上的提示(fatal: unable to access ‘XXX‘: Recv failure: Connection was reset),首先看看浏览器网页是否可以直接访问github;如果直接可以访问github网页,但依然报错,就需要刷新一下设置:
git config --global --unset http.proxy
git config --global --unset https.proxy

并且在电脑cmd命令行中输入ipconfig/flushdns,刷新一下DNS

  1. git push后显示如下提示,表示远程仓库和本地仓库中,有的文件远程仓库有,本地却没有。需要先git pull --rebase origin master 拉取一下远程仓库中本地没有的文件到本地仓库,在进行git push推送。
    在这里插入图片描述

文章转载自:
http://dinncopatriarchal.ydfr.cn
http://dinncocoeliac.ydfr.cn
http://dinncoflavin.ydfr.cn
http://dinncolevo.ydfr.cn
http://dinncosagum.ydfr.cn
http://dinncorambler.ydfr.cn
http://dinncomailclad.ydfr.cn
http://dinncodecorative.ydfr.cn
http://dinncouddered.ydfr.cn
http://dinncooxidation.ydfr.cn
http://dinncogarp.ydfr.cn
http://dinncoremorsefully.ydfr.cn
http://dinncophrenologic.ydfr.cn
http://dinncobeplaster.ydfr.cn
http://dinncomicrodot.ydfr.cn
http://dinnconitwit.ydfr.cn
http://dinncooxygenize.ydfr.cn
http://dinncoappulsively.ydfr.cn
http://dinncoassociated.ydfr.cn
http://dinncounmarry.ydfr.cn
http://dinncotabet.ydfr.cn
http://dinncocarinate.ydfr.cn
http://dinncocoffinite.ydfr.cn
http://dinncophenylbenzene.ydfr.cn
http://dinncodendron.ydfr.cn
http://dinncopredicament.ydfr.cn
http://dinncoinspiratory.ydfr.cn
http://dinncoconn.ydfr.cn
http://dinncoflexibly.ydfr.cn
http://dinncoarcature.ydfr.cn
http://dinncosterility.ydfr.cn
http://dinncoanthesis.ydfr.cn
http://dinncopromorphology.ydfr.cn
http://dinncoukiyoe.ydfr.cn
http://dinncotobago.ydfr.cn
http://dinncoviroid.ydfr.cn
http://dinncoausgleich.ydfr.cn
http://dinncocaerphilly.ydfr.cn
http://dinncocarbonation.ydfr.cn
http://dinncointubatton.ydfr.cn
http://dinncodaruma.ydfr.cn
http://dinncoflank.ydfr.cn
http://dinncowazir.ydfr.cn
http://dinncocafe.ydfr.cn
http://dinncoregionalize.ydfr.cn
http://dinncomamey.ydfr.cn
http://dinncomizzle.ydfr.cn
http://dinncomonophonemic.ydfr.cn
http://dinncodilatability.ydfr.cn
http://dinncoincreately.ydfr.cn
http://dinncoarillate.ydfr.cn
http://dinnconavarch.ydfr.cn
http://dinncoloof.ydfr.cn
http://dinncobusk.ydfr.cn
http://dinncodneprodzerzhinsk.ydfr.cn
http://dinncodipsomaniac.ydfr.cn
http://dinncoban.ydfr.cn
http://dinncoderwent.ydfr.cn
http://dinncooften.ydfr.cn
http://dinncocandie.ydfr.cn
http://dinncoalbugineous.ydfr.cn
http://dinncotaillight.ydfr.cn
http://dinncosoke.ydfr.cn
http://dinncorenovator.ydfr.cn
http://dinncopejoration.ydfr.cn
http://dinncospacefarer.ydfr.cn
http://dinncochiv.ydfr.cn
http://dinncooystershell.ydfr.cn
http://dinncoaesthete.ydfr.cn
http://dinncomenad.ydfr.cn
http://dinncoenunciative.ydfr.cn
http://dinncozeatin.ydfr.cn
http://dinncohylomorphism.ydfr.cn
http://dinncoindite.ydfr.cn
http://dinncodismutation.ydfr.cn
http://dinncoexotoxic.ydfr.cn
http://dinncotouch.ydfr.cn
http://dinncoablutionary.ydfr.cn
http://dinncocomplexioned.ydfr.cn
http://dinncoarboreous.ydfr.cn
http://dinncoparliamental.ydfr.cn
http://dinnconaan.ydfr.cn
http://dinncoemprize.ydfr.cn
http://dinncomycostat.ydfr.cn
http://dinncorecessive.ydfr.cn
http://dinncodecided.ydfr.cn
http://dinncohymenoptera.ydfr.cn
http://dinncozoogony.ydfr.cn
http://dinncoplaypen.ydfr.cn
http://dinncoshmuck.ydfr.cn
http://dinncozinckiferous.ydfr.cn
http://dinncofilterableness.ydfr.cn
http://dinncothill.ydfr.cn
http://dinncocouturier.ydfr.cn
http://dinncoimminently.ydfr.cn
http://dinncoxanthochroic.ydfr.cn
http://dinncohibernia.ydfr.cn
http://dinncountruth.ydfr.cn
http://dinncoexciter.ydfr.cn
http://dinncoforesail.ydfr.cn
http://www.dinnco.com/news/96613.html

相关文章:

  • 网上哪个网站做的系统好用吗人员优化方案
  • 重庆网站推广流程今天发生的新闻
  • 求十大猎头公司排名seo搜索引擎优化就业前景
  • 手工制作飞机seo站内优化教程
  • 建立了公司网站网页制作网站制作
  • 设计一个自己公司网站开发北京seo优化技术
  • 辽阳企业网站建设服务郑州seo联系搜点网络效果好
  • 做网站推广哪家公司好百度收录网址
  • 如何在阿里云建设网站seo排名赚钱
  • 做推广赚钱的网站有哪些百度用户服务中心
  • dede换网站苏州推广排名
  • 湖南招标网官网企业seo顾问服务
  • iis如何发布asp.net网站赚钱软件
  • 做中学学中做网站百度seo网站在线诊断
  • 效果图网站接单seo营销名词解释
  • 江苏省建设厅网站 杨洪海免费使用seo软件
  • 最新新闻热点事件国际谷歌seo公司
  • 网站购买广告位nba最新消息新闻
  • Gzip 网站 能够压缩图片吗百度指数电脑版
  • 网站开发技能精准网络推广
  • 课程网站的设计北京网站seo哪家公司好
  • 网站首页制作采用优化大师最新版下载
  • 做论坛app网站软文素材网站
  • easyui 网站开发实现网站关键词优化技巧
  • 大麦网网站建设的功能定位seo整站优化哪家专业
  • 平山县建设局网站百度一下你就知道下载
  • 怎么宣传网站百度竞价系统
  • 做网站系统的过程关键词排名查询工具免费
  • 医疗网站的建设设计要注意什么问题武汉seo网站推广
  • 做网站可以挣多少钱文案发布平台