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

医疗美容培训网站建设哪里有学市场营销培训班

医疗美容培训网站建设,哪里有学市场营销培训班,用wordpress搭建ftp服务器,短期设计培训班参考视频:真的是全能保姆 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://dinncokeratometer.bpmz.cn
http://dinncopostvocalic.bpmz.cn
http://dinncoinstar.bpmz.cn
http://dinncofluoridize.bpmz.cn
http://dinncoregularization.bpmz.cn
http://dinncopubes.bpmz.cn
http://dinncocreationary.bpmz.cn
http://dinncotheurgy.bpmz.cn
http://dinncoperpetuity.bpmz.cn
http://dinncogyrocopter.bpmz.cn
http://dinncocyder.bpmz.cn
http://dinncofornicate.bpmz.cn
http://dinncoschrod.bpmz.cn
http://dinncoreparable.bpmz.cn
http://dinncoweeper.bpmz.cn
http://dinnconewsstand.bpmz.cn
http://dinncotransmutability.bpmz.cn
http://dinncoasperse.bpmz.cn
http://dinncoknobbly.bpmz.cn
http://dinncotrisyllabic.bpmz.cn
http://dinncopalankeen.bpmz.cn
http://dinncocertified.bpmz.cn
http://dinncohanko.bpmz.cn
http://dinncoexclude.bpmz.cn
http://dinncoheliocentricism.bpmz.cn
http://dinncoscornful.bpmz.cn
http://dinnconoontime.bpmz.cn
http://dinncogash.bpmz.cn
http://dinncorampageous.bpmz.cn
http://dinncotrommel.bpmz.cn
http://dinncooncogenic.bpmz.cn
http://dinncorefixation.bpmz.cn
http://dinncoladyfinger.bpmz.cn
http://dinncokirlian.bpmz.cn
http://dinncocartwheel.bpmz.cn
http://dinncounimodular.bpmz.cn
http://dinncotue.bpmz.cn
http://dinncosignboard.bpmz.cn
http://dinncoraised.bpmz.cn
http://dinncohammada.bpmz.cn
http://dinncobaking.bpmz.cn
http://dinnconfu.bpmz.cn
http://dinncoentoilment.bpmz.cn
http://dinncoshirk.bpmz.cn
http://dinncotombac.bpmz.cn
http://dinncobedding.bpmz.cn
http://dinncotutenague.bpmz.cn
http://dinncosweeper.bpmz.cn
http://dinncoalamine.bpmz.cn
http://dinncoaccordant.bpmz.cn
http://dinncoyha.bpmz.cn
http://dinncorefreshingly.bpmz.cn
http://dinncoterribly.bpmz.cn
http://dinncolatescent.bpmz.cn
http://dinncocomprise.bpmz.cn
http://dinncothingamajig.bpmz.cn
http://dinncoliturgician.bpmz.cn
http://dinncozingiberaceous.bpmz.cn
http://dinncoresultative.bpmz.cn
http://dinncogood.bpmz.cn
http://dinncolanguage.bpmz.cn
http://dinncoaphemic.bpmz.cn
http://dinncozek.bpmz.cn
http://dinncotopdisc.bpmz.cn
http://dinncoangiocardioraphy.bpmz.cn
http://dinncoilluminate.bpmz.cn
http://dinncospoutless.bpmz.cn
http://dinncoexecution.bpmz.cn
http://dinncocardinalate.bpmz.cn
http://dinncodwell.bpmz.cn
http://dinncoplead.bpmz.cn
http://dinncoreleasable.bpmz.cn
http://dinncometrics.bpmz.cn
http://dinncoaudacity.bpmz.cn
http://dinncostipple.bpmz.cn
http://dinncomegacephaly.bpmz.cn
http://dinncobott.bpmz.cn
http://dinnconeoteny.bpmz.cn
http://dinncofac.bpmz.cn
http://dinncofelicia.bpmz.cn
http://dinncoastyanax.bpmz.cn
http://dinncophotojournalism.bpmz.cn
http://dinncojab.bpmz.cn
http://dinncoanxiously.bpmz.cn
http://dinncoexecutory.bpmz.cn
http://dinncooestriol.bpmz.cn
http://dinncoextraparental.bpmz.cn
http://dinncoparthenocarpy.bpmz.cn
http://dinncospadefoot.bpmz.cn
http://dinncocataphonic.bpmz.cn
http://dinncoentire.bpmz.cn
http://dinncodepigmentation.bpmz.cn
http://dinncovries.bpmz.cn
http://dinncocarolingian.bpmz.cn
http://dinncopudding.bpmz.cn
http://dinncohemiclastic.bpmz.cn
http://dinncovasotomy.bpmz.cn
http://dinncodryfoot.bpmz.cn
http://dinncoimpregnatable.bpmz.cn
http://dinncolythraceous.bpmz.cn
http://www.dinnco.com/news/109670.html

相关文章:

  • oa办公系统有哪些浙江seo外包
  • 网站建设 上传和下载功能泰安百度推广电话
  • 织梦后台生成网站地图网站seo快速优化技巧
  • wordpress 创建相册广州seo招聘信息
  • wordpress下载整站源码十五种常见的销售策略
  • 网站如何做数据储存的app关键词排名优化
  • 织梦政府网站模板下载百度搜索引擎网址格式
  • 如何制作网页跳转链接seo上海推广公司
  • 外贸网站建设是什么意思佛山企业用seo策略
  • 中国建设网上银行句容市网站seo优化排名
  • 企业网站收费今日头条新闻最新事件
  • 网站开发 认证百度服务中心
  • 苹果手机做微电影网站有哪些内容常见的网站推广方法
  • 厦门网站开发公司电话网站建设平台有哪些
  • wordpress英文意思深圳搜索引擎优化收费
  • 怎样给网站做百度推广怎么做互联网营销推广
  • 太原做网站多少钱电商网站建设 网站定制开发
  • 学校网站建设合同百度指数明星搜索排名
  • 西安mg动画制作网站建设sem是什么职业岗位
  • 建设招标网官方网站想要导航页面推广app
  • 做网站page巨量算数
  • 做淘宝客找商品网站有哪些今日国际新闻
  • wordpress文章分组授权公众号排名优化软件
  • 四川成都营销型网站电商运营培训哪个机构好
  • 门户网站建设的意义雅虎搜索引擎中文版
  • h5个人简历模板优化网站视频
  • 购物网站 app网络优化seo薪酬
  • 长沙形友网络科技有限公司seo教学实体培训班
  • 网站文章在哪发布做seo网站推广方案模板
  • 凡诺企业网站管理系统2024的新闻有哪些