git 常用命令操作

目录

一、用户和邮箱

    用户和邮箱的作用

    查看用户名和邮箱地址

    修改用户名和邮箱地址

  1. 用户名和邮箱地址的作用

    用户名和邮箱地址是本地git客户端的一个变量,不随git库而改变。

    每次commit都会用用户名和邮箱纪录。

    github的contributions统计就是按邮箱来统计的。

  • 查看用户名和邮箱地址

    $ git config user.name
    
    $ git config user.email
  • 修改用户名和邮箱地址:
  • $ git config --global user.name "username"
    
    $ git config --global user.email "email"

原文地址:https://www.cnblogs.com/dqh94/p/8592670.html

时间: 2024-07-30 23:16:46

git 常用命令操作的相关文章

git常用命令---操作本地仓库

命令中:<>表示可选填写    []表示选项必须填写   ()表示可以等价替换为()里内容 1.暂存相关命令(前三个命令最常用) git add [file]      提交某文件到暂存区([file]可以是文件名或目录名) git add -A   <path>       提交所有变化到暂存区,省略<path>表示.(即当前目录) git add  .         提交新文件和被修改文件(不包括被删除文件)到暂存区 git add -u  <path>

git常用命令操作

目前市场主流的版本控制系统主要分为:集中式版本控制系统与分布式版本控制系统.集中式版本控制目前主流的:SVN分布式版本控制系统目前主流的:Git 两者之间的区别: 集中式有中央服务器,开发人员需要从中央服务器获得最新版本的项目然后在本地开发,开发完推送到中央服务器中,因此无法脱离服务器. 分布式没有中央服务器,开发人员本地都有local repository 集中式必须要联网才能工作,而且对网络的依赖性较强,如果推送的文件比较大而且网络状态欠佳,则提交文件的速度会受到很大的限制. 分布式在没有网

git常用命令符

全局配置 $ git config --global user.name "姓名" 告诉git你是谁 $ git config --global user.email "[email protected]" 告诉git怎么联系你 如果注册了 github 账号,邮箱最好和 github 账号统一 $ git config -l 查看配置信息初始化代码仓库 $ git init 初始化代码库 $ git add . 将所有变化添加到暂存区 $ git commit -

github创建远程仓库和git常用命令

git创建远程仓库 首先到github页面上创建仓库(repository)如下: 然后初始化文件夹为仓库,并提交到远程仓库,如下: [[email protected] aa]# git init Initialized empty Git repository in /data/mydata/aa/.git/ [[email protected] aa]# git add . [[email protected] aa]# git commit -m "first commit"

Git 常用命令集锦

远程仓库相关命令 克隆远程仓库:git clone git://github.com/jquery/jquery.git 查看远程仓库:git remote -v 添加远程仓库:git remote add [name] [url] 删除远程仓库:git remote rm [name] 修改远程仓库:git remote set-url --push [remoteName] [newUrl] 拉取远程仓库:git pull [remoteName] [remoteBranchName]:[l

windows下安装git并创建一个仓库,git常用命令

转载于:http://www.cnblogs.com/nemotan/p/4655498.html 一.windows安装git 1.下载:http://msysgit.github.io/,下载之后直接安装,打开gitbash 2.配置用户名和邮箱: $ git config --global user.name "Your Name" $ git config --global user.email "[email protected]" 3.新建一个文件夹并执

git常用命令及技巧

强推,即利用强覆盖方式用你本地的代码替代git仓库内的内容 git push -f git fetch --prune  #这样就可在本地删除在远程不存在的branch man git-fetch --prune After fetching, remove any remote tracking branches which no longer exist on the remote. -t, --tags Most of the tags are fetched automatically

Git 常用命令速查

一. Git 常用命令速查 git branch 查看本地所有分支 git status 查看当前状态 git commit 提交 git branch -a 查看所有的分支 git branch -r 查看远程所有分支 git commit -am "init" 提交并且加注释 git remote add origin [email protected]1.119:ndshow git push origin master 将文件给推到服务器上 git remote show or

Git 常用命令大全

Git 是一个很强大的分布式版本控制系统.它不但适用于管理大型开源软件的源代码,管理私人的文档和源代码也有很多优势. Git常用操作命令: 1) 远程仓库相关命令 检出仓库:$ git clone git://github.com/jquery/jquery.git 查看远程仓库:$ git remote -v 添加远程仓库:$ git remote add [name] [url] 删除远程仓库:$ git remote rm [name] 修改远程仓库:$ git remote set-ur