Git使用

基础

github、gitgee是git的一个托管平台

git是一个分布式的版本管理系统、每个人有一个自己档案馆,可以合并开发

svn是一个集中式的

下载:

git网站直接下载

配置姓名和邮箱:

git config --global user.name "xxx"

git config --global user.email xxx@qq.com

git -h查看命令

不明白的可以通过这种git -h 查看所有命令

功能:

git add 文件/目录 跟踪一个文件和目录 暂存

git rm 上面的撤销操作

git commit 提交操作

连接github

github上创建repos,复制https链接

git remote add origin GitHub - xzsl/taco-test: this is a test Project

推送到远程

git push origin master

git branch name 创建分支

git branch --list 显示分支

git checkout name 切换分支

git merge feature1 把feature1分支合并到当前分支上

git fetch 拉取远程仓库的分支

git checkout -b f1 origin.f2 给远程的f2分支建立一个本地分支

git stash和git stash apply用于储藏和恢复

相关推荐

  1. <span style='color:red;'>Git</span><span style='color:red;'>使用</span>

    Git使用

    2024-04-02 19:04:03      35 阅读
  2. <span style='color:red;'>git</span><span style='color:red;'>使用</span>

    git使用

    2024-04-02 19:04:03      39 阅读
  3. <span style='color:red;'>Git</span><span style='color:red;'>使用</span>

    Git使用

    2024-04-02 19:04:03      36 阅读
  4. <span style='color:red;'>Git</span><span style='color:red;'>使用</span>

    Git使用

    2024-04-02 19:04:03      28 阅读
  5. <span style='color:red;'>Git</span><span style='color:red;'>使用</span>

    Git使用

    2024-04-02 19:04:03      14 阅读
  6. Git使用

    2024-04-02 19:04:03       14 阅读
  7. GIT使用

    2024-04-02 19:04:03       9 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-02 19:04:03       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-02 19:04:03       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-02 19:04:03       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-02 19:04:03       18 阅读

热门阅读

  1. 每日一题: 为什么要使用Spring?

    2024-04-02 19:04:03       14 阅读
  2. 【数据库】[MYSQL][面试题]常见数据库知识整理

    2024-04-02 19:04:03       15 阅读
  3. C++ map 常用部分

    2024-04-02 19:04:03       14 阅读
  4. 【zml】vp9 vp8

    2024-04-02 19:04:03       11 阅读
  5. 简单的HTML

    2024-04-02 19:04:03       13 阅读
  6. 东方财富网股票数据爬虫

    2024-04-02 19:04:03       13 阅读
  7. Windows 11 中Docker的安装教程

    2024-04-02 19:04:03       17 阅读
  8. terraform读取tfvars的变量

    2024-04-02 19:04:03       14 阅读
  9. MATLAB如何批量更改文件名

    2024-04-02 19:04:03       13 阅读