1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git系メモ

Last updated at Posted at 2016-05-29

gitconfig

  • systemを開くとき
$ git config --system -e
  • globalを開くとき
$ git config --global -e

中身

/usr/local/etc/gitconfig
[alias]
  st = status
  ch = checkout
  co = commit
  gr = log --graph --oneline
  br = branch
  ad = add
  ps = push
  pl = pull
  • bash_profileにもこんな設定
~/.bash_profile
alias gc='git branch | peco | xargs git checkout'

これでgcと打てばブランチ名をインクリメンタルサーチしてチェックアウトできる

コマンド達

  • git reset: addの取り消し
  • git commit --amend: commitした後にaddしてcommitをやり直す
  • git checkout ファイル名: そのファイルの変更を戻す
  • git checkout .: 全てのファイルの変更を戻す
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?