美文网首页
Git使用指南<2020-04-22>

Git使用指南<2020-04-22>

作者: 乔乔乔0126 | 来源:发表于2020-04-22 10:09 被阅读0次

第一步:

git config --global user.name "Your Name" :配置用户名;
git config --global user.email "Email":配置邮箱;

第二步:

git add file.name :添加文件到缓存中;

第三步:

git commit -m "first commit":添加项目;

第四步:

git remote add origin git地址或sshKey:链接到远程仓库,这时会让输入gitHub的用户名和密码;

第五步:

git push -u origin master:添加成功;

分支管理:

git branch newBranch:新建分支;

git branch:查看分支;
输出:

  • master
    newBranch

git checkout newBranch:切换分支;
输出:
Switched to branch "newBranch"

切换后可用git branch来查看是否切换到当前分支:
gti branch => 输出:
master

  • newBranch

提交改动到当前分支:
git add .
git commit -a

git branch -D newBranch:删除分支;

相关文章

  • Git使用指南<2020-04-22>

    第一步: git config --global user.name "Your Name" :配置用户名;git...

  • 常用点

    git使用指南https://www.bootcss.com/p/git-guide/ pod安装https://...

  • git-flow使用指南

    git-flow使用指南 1.简介 git-flow是基于Git Flow工作流模型的工具,了解Git Flow ...

  • git使用指南

    git使用指南 1.新建一个“本地仓库”$ git init 2.配置仓库》告诉git你是谁git config ...

  • 带有照片的Latex简历模板

    项目地址 HowinLoo/ResumePhoto 宇宙使用指南 Fork → git clone WinEdt7...

  • sass/git/gulp

    sass用法指南sass语法 常用git指令git-book gulp详细入门教程gulp使用指南segmentf...

  • Git新手教程-什么是版本控制(一)

    前言 本来不打算写相关Git系列教程,因为网上已有廖雪峰老师的《Git教程》,及扔物线老师的《Git原理及使用指南...

  • git日常使用指南

    git日常使用指南 Git是使用广泛的分布式版本控制系统。版本控制,简单讲就是记录文件变更历史。使用Git可以处理...

  • 小白的git使用指南(二)

    前面的教程 小白的git使用指南(一) 主要写Git的安装与配置,本篇教程主要记述如何用git将写好的代码托管到G...

  • 基于SourceTree的git-flow使用指南

    基于SourceTree的git-flow使用指南 1. 设置用户名 首先来设置使用git时的姓名和邮箱,随便进入...

网友评论

      本文标题:Git使用指南<2020-04-22>

      本文链接:https://www.haomeiwen.com/subject/vwybihtx.html