git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "[email protected]"
ssh-keyの設定
ssh-keygen -t rsa -b 4096 -C "[email protected]"
cat ~/.ssh/id_rsa.pub
公開鍵をGithubのssh設定ページにコピーする。
ssh -T [email protected]
このメッセージが来たらok
Hi excid3! You've successfully authenticated, but GitHub does not provide shell access.
.gticonfig
[color]
ui = true
[user]
name = Fendo181
email = [email protected]
[alias]
a = add
cm = commit
cma = commit --amend
st = status
ss = status -s
sh = show
fe = fetch
me = merge
p = push
br = branch
ch = checkout
d = diff
d1 = diff HEAD~
d2 = diff HEAD~2
d3 = diff HEAD~3
#応用的エイリアス
ta = log --graph --branches --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(green)- %an, %cr%Creset'
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
[core]
editor = vim -c \"set fenc=utf-8\"
- コミットのlogをvimに設定する。
git config --global core.editor 'vim -c "set fenc=utf-8"'