git常用命令

1、查看配置

git config --list

2、远程代码拉到本地

  git clone git@code.ymmoa.com:changkang.cai/ymm-test-web.git

3、将暂存区中存放的文件提交到git仓库

git commit -m "tianruicai"

4、将本地代码库的当前分支推送到远程的代码库

git push -u origin tianruicai

1 git --version
2 git config --list
3 vim ~/.gitconfig
4 git config --global user.name"13564229364@163.com"
5 git config --global user.email 13564229364@163.com
6 git config --global user.name"tianruicai"
7 git config --list
8 git config user.name

10 git clone git@code.ymmoa.com:changkang.cai/ymm-test-web.git
11 git clone git@code.ymmoa.com:changkang.cai/ymm-test-web.git
12 ssh-keygen -t rsa -C "ruicai.tian@ymm56.com"
13 cd ~/.ssh
14 ssh-keygen -t rsa -C "ruicai.tian@ymm56.com"
15 cd ~/.ssh
16 git clone git@code.ymmoa.com:changkang.cai/ymm-test-web.git
17 git clone git@code.ymmoa.com:changkang.cai/ymm-test-web.git
18 git clone -o testweb git@code.ymmoa.com:jie.gu/ymm-test-web.git
19 git clone http://code.ymmoa.com/jie.gu/ymm-test-web.git
20 git config --list
21 vim ~/.gitconfig
22 git -version
23 git config --global user.email 13564229364@163.com
24 git config --list
25 vim ~/.gitconfig
26 U:#U:gi >E#>Egit =;#=; .D#.Dgit
27 git --version
28 git status
29 git add .
30 git commit -m "自动化接口"
31 git config --global user.name "ruicai.tian@ymm56.com"
32 git branch
33 pwd
34 git branch
35 git init
36 ls -ah
37 history

原文地址:https://www.cnblogs.com/kaola8023/p/8059543.html