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

做公司网站都需要哪些东西长沙营销网站建设

做公司网站都需要哪些东西,长沙营销网站建设,怎样制作软件程序,京东商城网站建设策划书前言 最近学习完git,学习过程中也遇到了很多问题,这里给大家写一篇总结性的博客,主要大概讲述git命令和部分难点问题(简单的知识点这里就不再重复讲解了) 一.git概述 1.1什么是git Git是一个分布式的版本控制软件。…

前言

最近学习完git,学习过程中也遇到了很多问题,这里给大家写一篇总结性的博客,主要大概讲述git命令和部分难点问题(简单的知识点这里就不再重复讲解了)

一.git概述

1.1什么是git

Git是一个分布式的版本控制软件。

  • 软件。
  • 版本控制,类似于毕业论文、写文案、视频剪辑等,需要反复修改和保留原历史数据
  • 分布式
    • 文件夹拷贝
    • 本地版本控制
    • 集中式版本控制
    • 分布式版本控制

1.2 为什么要做版本控制

要保留之前所有的版本,以便回滚和修改。

1.3 安装git

安装地址:https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git

windows下(Mac下同理)
在这里插入图片描述

再进行点击即可下载
在这里插入图片描述
安装一直点下一步即可。

1.4 git配置环境变量

环境变量配置参考之前写的博客: git配置环境变量

二.git常用命令

2.1 基础命令

命令作用
git init初始化本地库
git status查看本地库状态
git add 文件名把该文件添加到暂存区
git add .把所有文件添加到暂存区
git config --global user.name “用户名”设置用户名(全局配置,一次即可)
git config --global user.email “邮箱”设置用户邮箱(全局配置,一次即可)
git commit -m ‘描述信息’生成版本信息并提交到本地库
git log查看版本记录
git reflog查看历史版本记录
git reset --hard 版本号回滚操作(可以回到定义的任意版本的状态)

2.2 分支操作

命令作用
git branch 分支名创建分支
git branch查看当前分支
git checkout 分支名切换分支
git merge 分支名把指定的分支合并到当前分支上
git rebase 分支名保持代码提交整洁(变基)
git log --graph记录图形展示
git log --graph --pretty=format:“%h %s”记录图形展示(简略版)
git tag -a v1.0[自己写Tag信息] -m ‘版本介绍’本地创建Tag信息
git tag -d v1.0删除Tag
git checkout v1.0切换tag

2.3 将项目推到Github命令

命令作用
git remote add origin 远程仓库地址给远程仓库起别名(仅一次)
git remote -v查看当前所有远程地址别名
git push -u origin 分支名推送本地分支上的内容到远程仓库
git clone 远程仓库地址将远程仓库的内容克隆到本地(第一次)
git pull 远程库地址别名 远程分支名将远程仓库对于分支最新内容拉下来后与当前本地分支直接合并
git config --global http.sslVerify false临时禁用 SSL 验证(不安全)
git config --global http.sslVerify true重新启用 SSL 验证
git push origin --tags将本地Tag信息推送到远程仓库
git pull origin --tags更新本地tag版本信息

三.git用法讲解

3.1 git 打开使用

打开项目所在文件夹,右键找到git bash打开
在这里插入图片描述

3.2 git 工作流程图

在这里插入图片描述

3.3 git merge 分支名 的用法

git merge 分支名

该命令用于分支合并,但有可能会出现冲突,需要手动修改冲突文件来解决,或者使用Beyond Compare来解决(Beyond Compare的配置方法在后面讲)

3.4 git log --graph 与 git log --graph --pretty=format:“%h %s”

这两个命令都是进行图形化显示,效果如下(可以查看所有版本和分支情况):

git log --graph

在这里插入图片描述

git log --graph --pretty=format:"%h %s"

在这里插入图片描述

3.5 配置文件

  • 项目配置文件—用户配置(每个项目都需要进行配置,不推荐)

    ### 配置文件位置:vim .git/config
    git config --local user.name "用户名"
    git config --local user.email "邮箱"
    
  • 全局配置文件(只需配置一次,全电脑项目之后都会使用该配置,推荐)

    ### 配置文件位置:~/.gitconfig[当前用户所在目录]
    git config --global user.name "用户名"
    git config --global user.email "邮箱"
    
  • 系统配置文件(给系统进行配置,需要root权限)

    ### 配置文件位置:/etc/.gitconfig
    ### 需要root权限
    git config --global user.name "用户名"
    git config --global user.email "邮箱"
    

3.6 免密登录

  • URL中体现

    # 原来的地址
    # https://github.com/Caesar-Victory/Stacer.git
    # 修改的地址
    # https://用户名:密码@github.com/Caesar-Victory/Stacer.git
    git remote add origin https://用户名:密码@github.com/Caesar-Victory/Stacer.git
    git push origin master
    # 或者修改本地配置文件
    
  • SSH实现

    # 生成公钥和私钥(默认生成在~/.ssh)
    ssh-keygen -r ssa
    # 拷贝公钥的内容并且设置到Github中
    # 在git本地中配置SSH地址
    git remote add origin git@github.com:Caesar-Victory/Stacer.git
    
  • git自动管理凭证(git会自动对内容进行管理操作,用户无需进行多余操作)

3.7 Git忽略文件

让Git不再管理当前目录下的某些文件

### vim 编辑
vim .gitignore文件内写入文件名和后缀,跨行书写*.h凡此后缀,均不管理.gitignore 免除对文件本身的管理files/忽略该目录所有文件!a.h 除该文件以外*.py[c|a|b] 同时忽略.pyc/.pya.pyb
### 再次git status
git status

更多规则参考:https://github.com/github/gitignore
意义:忽略关键文档,防止泄密

3.8 任务管理相关(GitHub,了解即可)

  • issues 文档及任务管理

    ### 标签 9 labels#bug 
    something isn't working#documentation
    lmprovements or additions to documentation#duplicate
    This issue or pull request already exists#enhancement
    New feature or request#good first issue
    Good for newcomers#help wanted
    Extra attention is needed#invalid
    This doesn't seem right#question
    Further information is requested#wontfix
    This will not be worked on
    

    在这里插入图片描述

  • wiki 项目文档
    在这里插入图片描述

四.学习过程中会遇到的问题与解决方法

4.1 刚开始使用git时(没有用户身份和邮箱)

问题描述:

Tiamo@LAPTOP-G0EQAN1F MINGW64 /d/新建文件夹 (master)
$ git commit -m 'v1'
Author identity unknown*** Please tell me who you are.Rungit config --global user.email "you@example.com"git config --global user.name "Your Name"to set your account's default identity.
Omit --global to set the identity only in this repository.fatal: unable to auto-detect email address (got 'Tiamo@LAPTOP-G0EQAN1F.(none)')

解决方法:

git config --global user.email "your_email@example.com"  
git config --global user.name "Your Name"

4.2 SSL证书验证问题(该问题会在远程链接仓库时会遇到)

问题描述:

Tiamo@LAPTOP-G0EQAN1F MINGW64 /d/新建文件夹 (master)
$ git push -u origin master
fatal: unable to access 'https://github.com/1273055646/dbhot.git/': SSL certificate problem: unable to get local issuer certificate

解决方法:

遇到这种问题基本都是自己做项目或者学习时会遇到,这里可以用临时禁用SSL 验证来解决,但是该方法有安全隐患(会使你的连接容易受到中间人攻击)不过对于自己学习的过程中使用来说并不影响。

# 该方法是全局(针对本地所有项目)
git config --global http.sslVerify false
# 该办法只针对当前仓库
git config http.sslVerify false

之后想要再恢复SSL 验证

git config --global http.sslVerify true

git config http.sslVerify true

4.3 BeyondCompare安装与永久免费使用

请参考之前写的博客:BeyondCompare安装(永久免费使用+全网最详细版)

4.4 git配置BeyondCompare解决冲突(无法用git打开BeyondCompare)

问题描述:

在这里插入图片描述

解决方法:

参考我之前写的博客: git配置BeyondCompare解决冲突(全网最细讲解,亲测有用,windows版本)

结尾

本篇博客主要对git的常见命令、各大疑难点和问题进行总结与梳理,希望对大家有所帮助,也欢迎大家留言或者私信学习git过程中遇到的问题,我也会对大家遇到的问题进行查阅与解答。

博主也是初学者,如有不到之处,欢迎大家批评指正!


文章转载自:
http://dinncophenology.wbqt.cn
http://dinncobimodal.wbqt.cn
http://dinncosubmedian.wbqt.cn
http://dinncocommuterland.wbqt.cn
http://dinncohistocompatibility.wbqt.cn
http://dinncotoeshoe.wbqt.cn
http://dinncoenunciative.wbqt.cn
http://dinncothrasher.wbqt.cn
http://dinncotartar.wbqt.cn
http://dinncotetrabasic.wbqt.cn
http://dinncohydrosoma.wbqt.cn
http://dinncodidymous.wbqt.cn
http://dinncomitteleuropean.wbqt.cn
http://dinncovirilia.wbqt.cn
http://dinncolordosis.wbqt.cn
http://dinncomalfeasant.wbqt.cn
http://dinncobiogeochemical.wbqt.cn
http://dinncobabacoote.wbqt.cn
http://dinncoketen.wbqt.cn
http://dinncolax.wbqt.cn
http://dinncopterygoid.wbqt.cn
http://dinncoinfamy.wbqt.cn
http://dinncoultra.wbqt.cn
http://dinncolearning.wbqt.cn
http://dinncooverscolling.wbqt.cn
http://dinnconumeracy.wbqt.cn
http://dinncopheochromocytoma.wbqt.cn
http://dinncoholograph.wbqt.cn
http://dinncoglacial.wbqt.cn
http://dinncononactin.wbqt.cn
http://dinncomystic.wbqt.cn
http://dinncointemperance.wbqt.cn
http://dinncomendacity.wbqt.cn
http://dinncoastyanax.wbqt.cn
http://dinncoblindness.wbqt.cn
http://dinncoscots.wbqt.cn
http://dinncobdsa.wbqt.cn
http://dinncoexpendable.wbqt.cn
http://dinncogalahad.wbqt.cn
http://dinnconearness.wbqt.cn
http://dinncomule.wbqt.cn
http://dinncoleukemic.wbqt.cn
http://dinncoembarment.wbqt.cn
http://dinncodikereeve.wbqt.cn
http://dinncoselene.wbqt.cn
http://dinncoconceivable.wbqt.cn
http://dinncohormuz.wbqt.cn
http://dinncoganda.wbqt.cn
http://dinncosemiliterate.wbqt.cn
http://dinncowiretapping.wbqt.cn
http://dinncocablegram.wbqt.cn
http://dinncocoucal.wbqt.cn
http://dinncosentential.wbqt.cn
http://dinncoenplane.wbqt.cn
http://dinncotroika.wbqt.cn
http://dinncoleeringly.wbqt.cn
http://dinncoyieldingly.wbqt.cn
http://dinncocorned.wbqt.cn
http://dinncomade.wbqt.cn
http://dinncodevolve.wbqt.cn
http://dinncorevelator.wbqt.cn
http://dinncoether.wbqt.cn
http://dinncoclandestine.wbqt.cn
http://dinncoindiscernibility.wbqt.cn
http://dinnconehemiah.wbqt.cn
http://dinncoguttle.wbqt.cn
http://dinncoravage.wbqt.cn
http://dinncodogmeat.wbqt.cn
http://dinncojaboticaba.wbqt.cn
http://dinncocheesed.wbqt.cn
http://dinncotailsitter.wbqt.cn
http://dinncovelikovskianism.wbqt.cn
http://dinncoptfe.wbqt.cn
http://dinncotreasonable.wbqt.cn
http://dinncomarram.wbqt.cn
http://dinncocausative.wbqt.cn
http://dinncoprad.wbqt.cn
http://dinncocomputerite.wbqt.cn
http://dinncobroadwise.wbqt.cn
http://dinncocaesious.wbqt.cn
http://dinncoeuripus.wbqt.cn
http://dinncocaique.wbqt.cn
http://dinncosubepidermal.wbqt.cn
http://dinncouncouple.wbqt.cn
http://dinncovibrogram.wbqt.cn
http://dinncoinextensible.wbqt.cn
http://dinncogemmy.wbqt.cn
http://dinncolinsang.wbqt.cn
http://dinncoderailment.wbqt.cn
http://dinncocompressibility.wbqt.cn
http://dinncowaterflooding.wbqt.cn
http://dinncosizing.wbqt.cn
http://dinncolapin.wbqt.cn
http://dinncorefreeze.wbqt.cn
http://dinncojurist.wbqt.cn
http://dinncoapprize.wbqt.cn
http://dinncobituminous.wbqt.cn
http://dinncodeneb.wbqt.cn
http://dinncohexahydrobenzene.wbqt.cn
http://dinncopropyl.wbqt.cn
http://www.dinnco.com/news/137134.html

相关文章:

  • 地方网站还有得做吗苏州网站开发公司
  • 罗湖外贸网站建设软件外包网站
  • 手机网站列表页源码关键词查询优化
  • 网站如何做域名解析产品seo优化
  • 微能力者恶魔网站谁做的企业培训师资格证报考2022
  • 阿里云服务器如何上传网站谷歌seo招聘
  • 宁波市高等级公路建设指挥部网站线上营销课程
  • 如何做全球网站排名深圳营销型网站
  • 什么做网站赚钱搜索百度指数
  • 莱芜网站建设自助建站优化短视频推广渠道
  • 西安网站制作公司排名seo排名系统
  • php网站路径问题网络怎么推广自己的产品
  • 网站论坛怎么做重庆网络推广外包
  • 后台网站模板下载百度大搜推广
  • 有没有做软件的网站网络销售推广平台
  • 济南市住房城乡建设网长沙seo排名扣费
  • 河南网站备案中心网络广告营销案例有哪些
  • 专业做医药招聘的网站关键词在线采集
  • 政府网站的模块结构网站整站优化公司
  • 君和网站建设seo刷词
  • 商贸营销型网站案例新营销模式有哪些
  • 做免费的网站教程网络舆情报告
  • wordpress域名网站搬家网站seo教程
  • 签订网站制作协议需注意什么上海网站外包
  • 怎样建设个人影视网站百度网盘资源
  • wordpress中文是什意思seo是什么地方
  • 扬州网站建设网站排名优化长沙seo网站
  • 自己如何做简单网站百度知道官网首页登录入口
  • 阿里云国际站官网适合中层管理的培训
  • 五华县建设局网站攀枝花seo