zoukankan      html  css  js  c++  java
  • Git 帮助

    Git

    配置

    1. 配置

      git config --global user.name "..."

      git config --global user.email "..."

      支持中文路径和文件

      git config --global core.quotepath false          # 显示 status 编码
      git config --global gui.encoding utf-8            # 图形界面编码
      git config --global i18n.commit.encoding utf-8    # 提交说明编码
      git config --global i18n.logoutputencoding utf-8  # 输出 log 编码
      

      注意git config命令的--global参数,用了这个参数,表示你这台机器上所有的Git仓库都会使用这个配置,当然也可以对某个仓库指定不同的用户名和Email地址。

    2. 创建版本仓库 ( repository )

      mkdir learngit						# 新建仓库目录
      cd learngit
      git init .			    			# 初始化配置仓库
      git add readme.txt					# 把文件添加到暂存区
      git commit -m "wrote a readme file"	  # 把文件提交到仓库,`-`m后面输入的是本次提交的说明
      git tag -a v1 -m "第一版" 			   # 打一个标签
      git tag								# 查看标签
      git show v1							# 详细查看标签版本
      git branch	m2						# 创建分支
      git checkout m2						# 切换分支
      git checkout master					# 回到默认分支
      git log --all --graph				# 图形化查看所有分支
      git merge **						# 合并分支
      
      git remote add github https://github.com/wuxie0ne/notes.git # 添加远程仓库
      git remote  [-v]					# 查看当前的远程仓库
      git push	-u github master		# 提交到远程仓库
      
      git init .
      git add .
      git commit -m ""
      git status
      git log
      git checkout *******
      git tag -a ** -m "" *******
      git tag
      git show **
      
  • 相关阅读:
    exploded archive 和packaged archive 区别
    MyEclipse6.5使用设置技巧及快捷键
    本机上设置域名解析
    Cookie的生命周期问题
    简单的函数柯里化
    cookie操作
    自定义事件
    解耦应用逻辑/事件处理程序
    dragdrop + 自定义事件
    在窃取函数中用作用域安全的构造函数
  • 原文地址:https://www.cnblogs.com/wuxie0ne/p/10672456.html
Copyright © 2011-2022 走看看