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

宁波网站建设专业定制广州网站推广软件

宁波网站建设专业定制,广州网站推广软件,京东网站的建设与发展现状分析,网站优化策划书参考视频:真的是全能保姆 git、github 保姆级教程入门,工作和协作必备技术,github提交pr - pull request_哔哩哔哩_bilibili 1.Git初始化 首先设置名称和邮箱。然后初始化一下,然后就创建了一个空的Git仓库。 PS D:\golang\oth…

参考视频:真的是全能保姆

git、github 保姆级教程入门,工作和协作必备技术,github提交pr - pull request_哔哩哔哩_bilibili

1.Git初始化

首先设置名称和邮箱。然后初始化一下,然后就创建了一个空的Git仓库。 

PS D:\golang\otherProjects\ginchat> git version
git version 2.42.0.windows.1
PS D:\golang\otherProjects\ginchat> git config --global user.name "Orange"
PS D:\golang\otherProjects\ginchat> git config --global user.email "xxxxx@qq.com"
PS D:\golang\otherProjects\ginchat> git config
PS D:\golang\otherProjects\ginchat> git init
Initialized empty Git repository in D:/golang/otherProjects/ginchat/.git/

可以在当前项目目录里发现一个隐藏文件夹.git,这个文件里保存项目的每个版本和变化

2.Git暂存、提交、日志

1)第一版本

git提交到暂存区

git add + 想存储的文件
git add . //存储当前目录所有文件

2) 

 git提交,之后会出现vim编辑器编写文件说明,此处是linux命令常规操作

git commit

如果在命令行编辑,遵守vim规范。如果在vscode编辑,编辑完关闭即可。随后就自动开始提交过程。

3) 

 git log查看提交日志信息,此时完成了一个版本的提交

PS D:\golang\otherProjects\ginchat> git log
commit 078d952815dcec6a0c25e668ad1f5ad72ddb6874 (HEAD -> master)
Author: Orange <xxxx@qq.com>
Date:   Tue Sep 5 03:03:19 2023 +0800版本v0.1,第一次提交
PS D:\golang\otherProjects\ginchat> 

4)第二版本

vscode版本新增文件显示绿色

修改一个文件会显示橙色M

5)第二次提交

第二次暂存和提交。用-m + 说明的形式可以直接代替上面的vim文档说明编写。

PS D:\golang\otherProjects\ginchat> git add .
PS D:\golang\otherProjects\ginchat> git commit -m "v0.2第二次提交"
[master a1a2abf] v0.2第二次提交1 file changed, 1 insertion(+), 1 deletion(-)

git log查看 

PS D:\golang\otherProjects\ginchat> git log
commit a1a2abf9894af11d40fcc5dc76775e0c793c8f30 (HEAD -> master)
Author: Orange <xxx@qq.com>
Date:   Tue Sep 5 03:13:00 2023 +0800v0.2第二次提交commit 078d952815dcec6a0c25e668ad1f5ad72ddb6874
Author: Orange <xxx@qq.com>
Date:   Tue Sep 5 03:03:19 2023 +0800
:

6)第三次提交

一般编写说明按照如下的规范来写

写明修正了什么文件,修改了什么内容

 git commit -m "fix(version):change content"

PS D:\golang\otherProjects\ginchat> git add .
warning: in the working copy of 'gitLog', LF will be replaced by CRLF the next time Git touches it
PS D:\golang\otherProjects\ginchat> git commit -m "fix(version):change content"
[master 305c688] fix(version):change content1 file changed, 11 insertions(+)create mode 100644 gitLog

7)

vscode自带版本控制,左侧工具栏可以看到当前版本和上一版本对比。

点击勾号可以直接暂存和提交

3.回退版本并清空之后版本

回退版本,版本id可以在日志里看

git reset --hard + 版本id

回退之后项目变成当时版本,并且之后的日志都清空了,相当于回到那个时间点。

PS D:\golang\otherProjects\ginchat> git reset --hard 305c688213cd0321c23112e48fba0ffb8da566c3
HEAD is now at 305c688 fix(version):change content

4.切换版本和分支,不会清除其他版本

创建分支,有点像数据结构的树,加一个分支

git branch + 版本号

PS D:\golang\otherProjects\ginchat> git branch 0.3
PS D:\golang\otherProjects\ginchat> git branch 0.4
查看分支和切换分支,master是主支,其他是分支
PS D:\golang\otherProjects\ginchat> git branch -a 0.30.4
* master
PS D:\golang\otherProjects\ginchat> git checkout 0.3
Switched to branch '0.3'
M       version.txt
PS D:\golang\otherProjects\ginchat> git checkout master
Switched to branch 'master'
M       version.txt

5.合并分支

把分支版本合并到主版本,如图,每个人用一个分支版本开发自己的功能,最后老板把五个版本一合并就获得所有功能。

 git merge +版本号

PS D:\golang\otherProjects\ginchat> git merge 0.3
Already up to date.

所以为了方便团队开发和版本合并,就会建立服务器作为git仓库

6.上传到Github

git push 命令 | 菜鸟教程 (runoob.com)

echo "# Ginchat" >> README.md
git init
git add README.md
git commit -m "first commit" 
git branch -M main   //创建main分支,并设为主枝
git remote add origin https://github.com/BigBigOrangeSama/Ginchat.git  //添加远程仓库地址设代号为origin
git push -u origin main  //把项目上传到github的仓库里
//然后会让你输入账号密码

上传结果:上传成功,到github上查看

PS D:\golang\otherProjects\ginchat> git push -u origin master
info: please complete authentication in your browser...
Enumerating objects: 1260, done.
Counting objects: 100% (1260/1260), done.
Delta compression using up to 16 threads
Compressing objects: 100% (1228/1228), done.
Writing objects: 100% (1260/1260), 79.44 MiB | 2.88 MiB/s, done.
Total 1260 (delta 153), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (153/153), done.
To https://github.com/BigBigOrangeSama/Ginchat.git* [new branch]      master -> master
branch 'master' set up to track 'origin/master'.

7.项目克隆到本地

1)自己仓库下载到本地

如果你要参与某人的开源项目,把他的项目fork到自己的仓库,然后复制项目http链接。

用vscode打开一个空文件夹,在这个文件夹下的终端使用git clone命令

git clone + 项目http链接 + .    点代表当前文件夹

PS D:\golang\otherProjects\Git-demo> git clone https://github.com/BigBigOrangeSama/Git-demo.git .
Cloning into '.'...
remote: Enumerating objects: 1632, done.
remote: Counting objects: 100% (466/466), done.
remote: Compressing objects: 100% (276/276), done.
remote: Total 1632 (delta 207), reused 288 (delta 175), pack-reused 1166
Receiving objects: 100% (1632/1632), 284.21 KiB | 973.00 KiB/s, done.
Resolving deltas: 100% (439/439), done.

2)加入别人的仓库链接

做别人的项目的时候加入上游代码库http链接

PS D:\golang\otherProjects\Git-demo> git remote add upstream https://github.com/midorg-com/re01.git
PS D:\golang\otherProjects\Git-demo> git remote -v                                                
origin  https://github.com/BigBigOrangeSama/Git-demo.git (fetch)
origin  https://github.com/BigBigOrangeSama/Git-demo.git (push)
upstream        https://github.com/midorg-com/re01.git (fetch)
upstream        https://github.com/midorg-com/re01.git (push)

创建一个分支,然后随便写一点东西,然后add和commit

然后提交到自己fork的那个仓库里去

PS D:\golang\otherProjects\Git-demo> git checkout -b tx
Switched to a new branch 'tx'
PS D:\golang\otherProjects\Git-demo> git add .
PS D:\golang\otherProjects\Git-demo> git commit -m "add(test)"
On branch tx
nothing to commit, working tree clean
PS D:\golang\otherProjects\Git-demo> git add .
PS D:\golang\otherProjects\Git-demo> git commit -m "add(1111):xxxx"
[tx 617a1e7] add(1111):xxxx1 file changed, 3 insertions(+)create mode 100644 members/1111.jsonPS D:\golang\otherProjects\Git-demo> git remote -v
origin  https://github.com/BigBigOrangeSama/Git-demo.git (fetch)
origin  https://github.com/BigBigOrangeSama/Git-demo.git (push)
upstream        https://github.com/midorg-com/re01.git (fetch)
upstream        https://github.com/midorg-com/re01.git (push)

上传到仓库

PS D:\golang\otherProjects\Git-demo> git push origin tx            
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 16 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 365 bytes | 365.00 KiB/s, done.
Total 4 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
remote:
remote: Create a pull request for 'tx' on GitHub by visiting:
remote:      https://github.com/BigBigOrangeSama/Git-demo/pull/new/tx
remote:
To https://github.com/BigBigOrangeSama/Git-demo.git* [new branch]      tx -> tx

3)合并

点击PR拉取请求

 创建拉取请求,让项目主人把你修改的分支合并到主枝里去。显示able to merge就是可以提交

然后写上修改信息提交即可,等待项目主人合并

4)如果显示不能pr()

没有这个able to merge

可能是这段时间开源项目已经commit过了,导致版本不一致,需要你更新合并最新upstream链接,然后再提交。

 git fetch upstream

git merge 最新分支

git push

PS D:\golang\otherProjects\Git-demo> git fetch upstream
From https://github.com/midorg-com/re01* [new branch]      main       -> upstream/main
PS D:\golang\otherProjects\Git-demo> git merge upstream/main 
Already up to date.
PS D:\golang\otherProjects\Git-demo> git push xxxxxxx   xxxx


文章转载自:
http://dinncoeustatically.bkqw.cn
http://dinncobiosystematics.bkqw.cn
http://dinncooversize.bkqw.cn
http://dinncoposttyphoid.bkqw.cn
http://dinncoparasynapsis.bkqw.cn
http://dinncoexaggerative.bkqw.cn
http://dinncohypergol.bkqw.cn
http://dinncodisappointment.bkqw.cn
http://dinncoelectrician.bkqw.cn
http://dinncobenny.bkqw.cn
http://dinncotelecine.bkqw.cn
http://dinncopermanency.bkqw.cn
http://dinncogeocentricity.bkqw.cn
http://dinncomicrofiche.bkqw.cn
http://dinncoexperimental.bkqw.cn
http://dinncopantskirt.bkqw.cn
http://dinncobootleg.bkqw.cn
http://dinncohinterland.bkqw.cn
http://dinncotcb.bkqw.cn
http://dinncooutstanding.bkqw.cn
http://dinncoinnovator.bkqw.cn
http://dinncoampliation.bkqw.cn
http://dinncohistadrut.bkqw.cn
http://dinncocoalitionist.bkqw.cn
http://dinncowriggler.bkqw.cn
http://dinncopeacebreaking.bkqw.cn
http://dinncopsst.bkqw.cn
http://dinncoheadlong.bkqw.cn
http://dinncostodge.bkqw.cn
http://dinncoclomp.bkqw.cn
http://dinncoaug.bkqw.cn
http://dinncotelecourse.bkqw.cn
http://dinncodividing.bkqw.cn
http://dinncorangy.bkqw.cn
http://dinncomathematical.bkqw.cn
http://dinncoextender.bkqw.cn
http://dinnconeoterize.bkqw.cn
http://dinncoshogunate.bkqw.cn
http://dinncolegiron.bkqw.cn
http://dinncopi.bkqw.cn
http://dinncocountryside.bkqw.cn
http://dinncobreathalyser.bkqw.cn
http://dinnconymphish.bkqw.cn
http://dinncointarsia.bkqw.cn
http://dinncoacronymic.bkqw.cn
http://dinncoethinyl.bkqw.cn
http://dinncostigmatization.bkqw.cn
http://dinncoderogation.bkqw.cn
http://dinncomagnetobiology.bkqw.cn
http://dinncouncloak.bkqw.cn
http://dinncoarranging.bkqw.cn
http://dinncojuggins.bkqw.cn
http://dinncoseismometer.bkqw.cn
http://dinncoincorporable.bkqw.cn
http://dinncoinclasp.bkqw.cn
http://dinncodolittle.bkqw.cn
http://dinncogallo.bkqw.cn
http://dinncoattention.bkqw.cn
http://dinncojudoman.bkqw.cn
http://dinncosarangi.bkqw.cn
http://dinncopotch.bkqw.cn
http://dinncoadjutant.bkqw.cn
http://dinncoshifty.bkqw.cn
http://dinncohylicist.bkqw.cn
http://dinncomicroclimate.bkqw.cn
http://dinncounlawful.bkqw.cn
http://dinncomaukin.bkqw.cn
http://dinncolymphography.bkqw.cn
http://dinncoassiduity.bkqw.cn
http://dinncohumpty.bkqw.cn
http://dinncocivilianize.bkqw.cn
http://dinncohungary.bkqw.cn
http://dinncogynaecology.bkqw.cn
http://dinncolatona.bkqw.cn
http://dinncoetcher.bkqw.cn
http://dinncohadrosaur.bkqw.cn
http://dinncotamperproof.bkqw.cn
http://dinncomulberry.bkqw.cn
http://dinncocasablanca.bkqw.cn
http://dinncobdst.bkqw.cn
http://dinncoveil.bkqw.cn
http://dinncogeographer.bkqw.cn
http://dinncoworld.bkqw.cn
http://dinncospeleology.bkqw.cn
http://dinncoascham.bkqw.cn
http://dinncoivan.bkqw.cn
http://dinncodisfranchise.bkqw.cn
http://dinncokitchensink.bkqw.cn
http://dinncoindelible.bkqw.cn
http://dinncolimbal.bkqw.cn
http://dinncovalse.bkqw.cn
http://dinncounbed.bkqw.cn
http://dinncomhl.bkqw.cn
http://dinncowireman.bkqw.cn
http://dinncosolemnise.bkqw.cn
http://dinncotriumphantly.bkqw.cn
http://dinncocensorable.bkqw.cn
http://dinncoecclesiastical.bkqw.cn
http://dinncocolophon.bkqw.cn
http://dinncobioglass.bkqw.cn
http://www.dinnco.com/news/138223.html

相关文章:

  • 网站建设技术指标吉林seo关键词
  • 宣传单设计seo实战培训费用
  • 物流网站平台建设五行seo博客
  • 宁波淘宝网站建设推广资源seo
  • 做汽车保养的网站上广告软文怎么写
  • 向网站上传文件怎么做3天引流800个人技巧
  • 西宁做腋臭哪里北大DE网站手机系统流畅神器
  • asp旅游网站模板下载河南网站建设哪个公司做得好
  • 网站被降权表现海门网站建设
  • 网站设计用户体验长沙seo搜索
  • 哪个网站上门做护肤周口网站制作
  • 程序员做图网站10常用的网络营销方法
  • 房屋中介做网站的书籍seo二级目录
  • 做音乐网站赚钱吗百度广告位价格
  • 安阳哪里有做网站的如何将网站的关键词排名优化
  • 郑州网站制作郑州网站制作案例设计网站官网
  • 做动效很好的网站苏州seo网站系统
  • 北京建设银行网站模板建站的网站
  • 渭南做网站的公司石家庄百度快照优化
  • 仙桃做网站找谁自动收录网
  • 建设网站需要哪些语言推广软件赚钱违法吗
  • 怎样可以有自己的网站常用的关键词优化策略有哪些
  • 深圳网站建 1设骏域网站建设免费网站代理访问
  • 免费做网站的好不好北京百度快照推广公司
  • 网站维护的主要工作河北高端网站建设
  • 皖icp备 网站建设维普网论文收录查询
  • 有域名 有固定ip怎么做网站ip软件点击百度竞价推广
  • 养老做增减的网站灰色关键词排名代发
  • 外贸网站建设原则做网络推广可以通过哪些渠道推广
  • 下载网站 源码看广告赚钱一天50元