当前位置:   article > 正文

IOS----macOS系统上安装,使用Git,常用可视化工具_mac安装小乌龟

mac安装小乌龟

安装

二进制安装

下载二进制安装文件,直接安装

brew方式

如果你会用brew,那么可以执行:brew install git,完成安装。

Xcode Command Line Tools

Command Line Tools是在Xcode中的一款工具,可以在命令行中运行C/C++程序,还包含一些命令,就包含Git命令

xcode-select --install
  • 1

查看版本#

git --version
  • 1

常用Git可视化工具简介

  • TortoiseGit(小乌龟)
  • SourceTree
  • Gitfork

常用命令

配置用户信息
git config --global user.name "test"
git config --global user.email "test@163.com"
  • 1
  • 2
创建仓库
git init
  • 1
查看仓库状态
git status
  • 1
将文件添加到暂存区
git add index.html

或添加所有

git add -A
  • 1
  • 2
  • 3
  • 4
  • 5
提交更新
git commit -m "add index file"
  • 1
查看提交历史
git log
  • 1
恢复提交历史
git reset --hard HEAD~

恢复到指定提交

git reset --hard 提交id
  • 1
  • 2
  • 3
  • 4
  • 5
恢复没有提交到暂存区文件
git restore 文件名称
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/504408
推荐阅读
相关标签
  

闽ICP备14008679号