@lesonky
2017-06-23T06:54:53.000000Z
字数 1427
阅读 813
git
cat ~/.gitconfig
[user]
name = Yu Xie
email = yu.xie@sky-data.cn
[alias]
st = status
ci = commit
br = branch
co = checkout
[sendemail]
smtpuser = yu.xie@sky-data.cn
smtpserver = smtp.mxhichina.com
smtpencryption = tls
smtpserverport = 25
suppresscc = self
ssh-keygen
cat ~/.ssh/config
#skydata gitlab host
Host 192.168.20.14
user git
IdentityFile ~/.ssh/skydata
Hostname 192.168.20.14
Port 24
测试
ssh git@192.158.20.14
workspace -> stage -> repo -> remote repo
git checkout commit-hash filename
git add -u 把代码的修改加入到stage中
git push origin master, 把master 分支push到远程
git log -p file 查看文件的修改历史
git show COMMIT-HASH
git br -D branch-name-to-delete
git checkout -b new-branch-name
git reset --hard HEAD~1
.gitignore