百度收录网站需要多久做海外推广的公司
news/
2025/9/25 20:36:00/
文章来源:
百度收录网站需要多久,做海外推广的公司,自适应网站一般做多大尺寸,网络服务是干什么的一、Git概述#xff08;1#xff09;定义Git是目前世界上最先进的分布式版本控制系统。#xff08;2#xff09;能干什么#xff1f;解决冲突、管理权限、代码备份、协同开发、版本还原、历史追查、版本记录、分支管理、代码审查#xff08;3#xff09;集中管理型版本管…一、Git概述1定义Git是目前世界上最先进的分布式版本控制系统。2能干什么解决冲突、管理权限、代码备份、协同开发、版本还原、历史追查、版本记录、分支管理、代码审查3集中管理型版本管理经典的集中管理型CVS、VSS、SVN特点 实现了大部分开发中对版本管理的需求 结构简单上手容易。依然存在的问题1、版本管理的服务器一旦崩溃硬盘损坏代码如何恢复2、程序员上传到服务器的代码要求是完整版本但是程序员开发过程中想做小版本的管理以便追溯查询怎么办3、系统正在上线运行时不时还要修改bug要增加好几个功能要几个月如何管理几个版本4、如何管理一个分布在世界各地、互不相识的大型开发团队4Git如何解决Git 工具1、命令行工具Git for windows下载地址https://git-for-windows.github.io/2、 操作系统中可视化工具TortoiseGit下载地址 Windows Shell Interface to Git3、 Eclipse插件 EgitEclipse自带插件市场搜索最新版4、 GitHub网站Build software better, together 二、Git软件 1、git环境下载安装安装完成后还需要最后一步设置在命令行输入如下Git是分布式版本控制系统所以需要填写用户名和邮箱作为一个标识。C:Usersadmin路径下的.gitconfig文件里面可以看到--global 表示全局属性所有的git项目都会共用属性操作mrman文件自动产生2、Git软件操作1理解工作目录暂存区本地仓库工作区(Working Directory):就是你电脑本地硬盘目录本地库(Repository):工作区有个隐藏目录.git它就是Git的本地版本库暂存区(stage):一般存放在git目录下的index文件.git/index中所以我们把暂存区有时也叫作索引index。2操作创建项目文件夹设置文件夹属性创建本地版本仓库mrmanDESKTOP-QH8S7FP MINGW64 /e
$ git init //初始化一个仓库执行命令“ git init”
Initialized empty Git repository in E:/.git/mrmanDESKTOP-QH8S7FP MINGW64 /e (master)多出来一个文件提交文件新建文件名为“hello.txt”hello.txt编辑内容111111111输入命令git add 文件名将文件添加到暂存区没有放在仓库mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git add hello.txtmrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git status //查看状态
On branch masterInitial commitChanges to be committed:(use git rm --cached file... to unstage)new file: hello.txtUntracked files:(use git add file... to include in what will be committed)$RECYCLE.BIN/Linux/ZJZL/kinggsoft/qqpcmgr_docpro/qycache/mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$如图所示输入命令git commit 提交文件到本地库mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git commit
[master (root-commit) 1a89c3f] create 11 file changed, 1 insertion()create mode 100644 hello.txt若想再次提交可以这样操作先修改hello.txtmrmanmrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git commit
warning: LF will be replaced by CRLF in hello.txt.
The file will have its original line endings in your working directory.
[master warning: LF will be replaced by CRLF in hello.txt.
The file will have its original line endings in your working directory.
9696331] updata 2
warning: LF will be replaced by CRLF in hello.txt.
The file will have its original line endings in your working directory.1 file changed, 2 insertions(), 1 deletion(-)mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$//查看提交文件有哪些
mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git log
commit 96963315b2c39a52a4f97bf2bd79551d2226d87c
Author: gitacct_pm mrman8868163.com
Date: Mon May 11 11:34:49 2020 0800updata 2commit 1a89c3f50f37f89a717ca116c968bd229ce4bf6d
Author: gitacct_pm mrman8868163.com
Date: Mon May 11 11:26:15 2020 0800create 1查看文件提交记录
//行查看查看简易信息mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git log --prettyoneline
96963315b2c39a52a4f97bf2bd79551d2226d87c updata 2
1a89c3f50f37f89a717ca116c968bd229ce4bf6d create 1回退历史
//回退到上一次提交
mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git reset --hard HEAD^
HEAD is now at 1a89c3f create 1//再次查看发现updata 2没有了
mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git log --prettyoneline
1a89c3f50f37f89a717ca116c968bd229ce4bf6d create 1版本穿越
//查看历史记录的版本号
$ git reflog
1a89c3f HEAD{0}: reset: moving to HEAD^
9696331 HEAD{1}: commit: updata 2
1a89c3f HEAD{2}: commit (initial): create 1//恢复 updata 2
mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git reset --hard 9696331
HEAD is now at 9696331 updata 2//再次查看发现有updata 2
mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git log --prettyoneline
96963315b2c39a52a4f97bf2bd79551d2226d87c updata 2
1a89c3f50f37f89a717ca116c968bd229ce4bf6d create 1
误删除项目文件夹中的hello.txt文本输入命令git checkout 文件名此时仓库中的文件依然存在所以可以从本地仓库中还原文件mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git checkout hello.txt若想删除后的hello.txt文件想增加到缓冲区里面mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git add hello.txtmrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git status
On branch master
Changes to be committed:(use git reset HEAD file... to unstage)modified: hello.txtUntracked files:(use git add file... to include in what will be committed)$RECYCLE.BIN/Linux/ZJZL/kinggsoft/qqpcmgr_docpro/qycache/若想知道曾经做过哪些操作不管是增删改查可以这样做mrman3系统上线了但是产品经理又提了新的需求评估一下工期要两个月但是同时系统正在上线运行时不时还要修改bug如何管理几个版本创建分支//创建分支
切换分支//切换名为“branchA”分支
mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git checkout branchA
Switched to branch branchA//创建word.txt文件写数据word
mrmanDESKTOP-QH8S7FP MINGW64 /e (branchA)
$ echo word word.txt创建word.txt文件//创建新的这个文件存放在仓库里面
mrmanDESKTOP-QH8S7FP MINGW64 /e (branchA)
$ git add word.txt
warning: LF will be replaced by CRLF in word.txt.
The file will have its original line endings in your working directory.mrmanDESKTOP-QH8S7FP MINGW64 /e (branchA)
$ git commit -m create1
[branchA ff28a03] create1
warning: LF will be replaced by CRLF in word.txt.
The file will have its original line endings in your working directory.1 file changed, 1 insertion()create mode 100644 word.txt切换主线mastermrmanDESKTOP-QH8S7FP MINGW64 /e (branchA)
$ git checkout master
Switched to branch master发现开始创建的work.txt文件没有了切换回来branchAmrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git checkout branchA
Switched to branch branchA发现开始创建的work.txt文件有了合并分支以master为主//切换主线master
mrmanDESKTOP-QH8S7FP MINGW64 /e (branchA)
$ git checkout master
Switched to branch master//合并分支
mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git merge branchA
Updating 9696331..ff28a03
Fast-forwardword.txt | 1 1 file changed, 1 insertion()create mode 100644 word.txt
mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git checkout master
Already on master mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ vim word.txt123 wordmrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git add word.txtmrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git commit -m add 123
[master f01119e] add 1231 file changed, 1 insertion(), 1 deletion(-)三、GitHub1、GitHub是什么HUB是一个多端口的转发器在以HUB为中心设备时即使网络中某条线路产生了故障并不影响其它线路的工作。GitHub是一个Git项目托管网站,主要提供基于Git的版本托管服务网址https://github.com/ 注册账号的注意事项较长时间不使用有可能被Github冻结账号。请登录其客服页面https://github.com/contact填写账号恢复申请。首先登录自己的github输入邮箱地址密码登录github验证代码编码github验证码首先创建项目工程之后我们需要在git的窗口操作命令先执行git reflogmrman增加远程地址一般直接用origin作代号也可以自定义另需要执行自己的github创建仓库生成的远程HTTPS的远程地址。执行命令//告诉远程仓库地址
推送到远程库mrmanDESKTOP-QH8S7FP MINGW64 /e (master)
$ git push origin master
登录口输入邮箱口弹出窗口输入密码加载这些信息$ 说明连上了区自己的github查看如图所示2、从GitHub上克隆复制一个项目1在自己github的文件数据或项目克隆到本地指定的文件目录下通俗说下载到本地磁盘可以这样操作执行命令如下mrman查看文件2若想要在本地磁盘文件做更改可以这样执行操作//先进入pt文件目录下
查看3每次输密码很烦篇先创建ssh密钥mrmanDESKTOP-QH8S7FP MINGW64 ~/Desktop
$ ssh-keygen -t rsa -C mrman10086163.comGenerating public/private rsa key pair.
Enter file in which to save the key (/c/Users/mrman/.ssh/id_rsa):
Created directory /c/Users/mrman/.ssh.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/mrman/.ssh/id_rsa.
Your public key has been saved in /c/Users/mrman/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:YswQszo3grwyfXvMhZ5gTR7mCf9ll3PGCaOX3ObucY mrman10086163.com
The keys randomart image is:
---[RSA 2048]----
| o |
| * |
| B |
|.. . X . |
|.. o X S |
| . o o |
|..o . o . . . |
|. . E |
| .. . o ...|
----[SHA256]-----登录Github后右上角点击setting在左侧菜单中选择SSH and GPG keys, 在右边点击New SSH keyTitle随便写Key 把之前id_rsa.pub的内容复制进去点击Add SSH key设置ssh key 完成。查看再次提交mrmanDESKTOP-QH8S7FP MINGW64 /e/.git/repository/pt (master)
$ git add word.txtmrmanDESKTOP-QH8S7FP MINGW64 /e/.git/repository/pt (master)
$ git commit -m add ssh
[master 97c8f26] add ssh1 file changed, 1 insertion(), 1 deletion(-)mrmanDESKTOP-QH8S7FP MINGW64 /e/.git/repository/pt (master)
$ git remote add originssh gitgithub.com:Peng8868sky/Project20200512.gitmrmanDESKTOP-QH8S7FP MINGW64 /e/.git/repository/pt (master)
$ git push originssh masterThe authenticity of host github.com (52.74.223.119) cant be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added github.com,52.74.223.119 (RSA) to the list of known hosts.
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 286 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To gitgithub.com:Peng8868sky/Project20200512.git98376c8..97c8f26 master - master
查看4代码提交先在idea根据登录自己的github后如下操作查看已经提交进来了
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/917493.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!