0
0

gitのコマンド備忘録

gitのコマンドを忘れてもいいように記事に残します

ブランチ確認

git branch

ブランチを作って作ったブランチに移動

git checkout -b ブランチ名

全てのファイルをステージングへあげる

git add .

ステージングのファイルをメッセージ付きでコミット

git commit -m 'message'

プッシュ

git push

ローカルブランチ削除

git branch -d ブランチ名

リモートブランチ削除

git push origin :ブランチ名

ステージング、コミット、プッシュまでまとめたシェル

git-add-commit-push.sh
#!/bin/zsh

# git add .
git add .

# コミットメッセージの入力を求める
read -p "Enter commit message: " commit_message

# git commit -m ''
git commit -m "$commit_message"

# git push
git push

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