LoginSignup
0
0

More than 3 years have passed since last update.

自分用Gitチートシート

Last updated at Posted at 2019-10-04

TL;DR

何度も同じことを検索しているので自分用にチートシートを作った。

チートシート

直前のcommitを修正したい

git add <ファイル名>
git commit —-amend

複数コミットをまとめる

git rebase -i HEAD~n 
# 消したいcommitをfixupに変更する

ブランチの名前を変更したい

git branch -m <新しいブランチ名> # 現在のブランチの名前を変更
git branch -m <古いブランチ名> <新しいブランチ名>

git addの取り消し

git reset <file_path>

gitの設定を確認したい

git config -l          # global
git config --local -l  # local

gitの設定変更したい

git config <key> <value>
0
0
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
0
0