zoukankan      html  css  js  c++  java
  • 多测师肖老师_git版本控制器之使用(3.2.3)

    1、打开git界面,如下图

    选择git  base,打开界面,git base可以使用linux命令操作

     2、找一个路径,创建一个仓库 (git   init)

    cd   盘符

    例如:cd   d

    git   init

       

     3、进行用户设置

    我在github上测试账号:

    账号:xlh1314

    邮箱:897900137@qq.com

     4、查看仓库当前配置

     5、创建一个文件

     6、git  status  查看当前文件的状态

     7、git  add  将代码添加到 暂存区

     8、git  status  查看diama文件的状态

     9、git  commit  -m    代码包   暂存区提交到版本库

    一个文件====git add===(暂存区)====git   commit  m====(版本库)

    ===================================================

    github操作

    url:https://github.com/

    (1)注册:

    (2)登录:

    (3)新建远程仓库

     4、远程仓库连接:

    ssh:git@github.com:xlh1314/hz15.git

    https:https://github.com/xlh1314/hz15.git

    5、设置本地仓库和远程仓库连接

     

     

     以上是填写秘钥的地方;

    6、生成秘钥

    (1)在git中输入命令

    Ssh-keygen

     复制秘钥在填写在github上

     7、将git和github进行连接

    git remote  add origin  git@github.com:xlh1314/hz15.git

    8、git  push   -u   origin   master

     9、git pull origin master

    =============================

    拓展:

    查看远程分支:
    git branch -a
    查看本地分支:
    git branch

    删除连接分支

    git remote rm origin

    重新连接:

    git remote  add origin 

    强制拉取:

    git fetch --all   从远程分支拉取所有代码

    git reset --hard origin/master 强制覆盖本地代码

    git pull 拉取

    非强制拉取:

    git reset
    git pull
  • 相关阅读:
    MongoDB-基础-limit-skip-sort
    MongoDB-基础-条件操作符
    mongodb-基础-update-remove
    Linq to sql-存储过程
    SQL Server-游标使用
    JavaScript-求时间差
    HTTP 错误 500.21
    .NET错误The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework
    HTTP 错误 500.21
    WebApi&MVC对比
  • 原文地址:https://www.cnblogs.com/xiaolehua/p/15672555.html
Copyright © 2011-2022 走看看