LoginSignup
0
0

More than 5 years have passed since last update.

gitをCLIで使うためのコマンド集メモ(随時追加)

Last updated at Posted at 2019-02-07

メッセージ付きでcommitする

git commit -m "This is a commit"

origin/masterにプッシュする

git push origin master

commitを直前のHEADにリセットする

git reset HEAD~

コミットログで各コミットの1行目のみを表示する(ハッシュ値、コミットメッセージ)

git log --pretty=oneline --abbrev-commit

Config系

リポジトリ単位のユーザー名とメールアドレスを確認する

git config --local user.name
git config --local user.email

リポジトリ単位のユーザー名とメールアドレスを変更する

git config --local user.name "wildmouse"
git config --local user.email "wildmouse@example.com"

--local--globalにするとOS全体での設定を確認できる

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