美文网首页
git常用操作

git常用操作

作者: zychen143 | 来源:发表于2017-06-12 16:44 被阅读0次

push设置无需每次输入密码

http连接方式

  • 方法一
git config --global credential.helper wincred
  • 方法二
http://[username]:[password]@zychen.com.cn/scm/nec/nec-server.git

username: 远程代码块的登录账号
password:远程代码块的登录密码
@后面的内容及为远程代码块

ssh连接方式

传送门

基本配置

# 配置用户信息
git config --global user.name stash <用户名>
git config --global user.email <公司邮箱> 

# 关闭自动crlf转换,开启crlf检查
git config --global core.autocrlf false
git config --global core.safecrlf true

# 给命令设置别名
git config --global alias.st status

常用操作

  • 删除远程仓库的分支
git push origin :远程分支名
  • 修剪远程中已经删除的分支,但在本地还存在的
git remote prune origin
  • 回退本地commit的历史
git reset HEAD^^
  • 将别的分支的commit的历史复制到当前分支
git cherry pick -提交的commit号

相关文章

  • 组件化(第一篇)

    组件化 git 常用操作指令 cocoapods的基本使用 cocoapods本地私有库 一、git 常用操作指令...

  • git的常用操作

    git的常用操作

  • GIt 操作补充

    常用的git操作命令 常用的git操作命令已经能够满足日常的工作需求 现补充一些高级命令 git branch -...

  • git使用整理

    git使用常用操作-常用基本命令 克隆:git clone 【url】 查看修改状态: git status (g...

  • GIT 版本管理 常用命令

    Git 常用命令流程图 Git常用操作命令: 初始化创建:$ git init //检出仓库:$ git clon...

  • 🍏常用 git 操作指北

    ? 常用 git 操作指南 ? git图形界面操作软件 ? 开发流程 git clone 拉取项目代码,不必多说 ...

  • git常用操作 🎀

    git常用操作 ? 基本知识 查看git信息 修改git配置 提交类操作 分支类操作 创建分支 查看分支 修改分支...

  • git常用操作命令

    git常用操作命令 1 git工作原理图 2 git远程操作 2.1 git clone 远程操作的第一步,通常是...

  • 真 git 操作大全 不会就看

    git 常用命令git 远程操作git 撤销操作 推酷git大全 react router4 中文文档 koa 简...

  • git常用操作

    git缩写配置: 在.gitconfig文件中添加: [alias] git常用操作: git clone 克隆一...

网友评论

      本文标题:git常用操作

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