LoginSignup
0
1

More than 3 years have passed since last update.

GitHubにpushせよ

Last updated at Posted at 2020-12-15

はじめに

本当にいつもいつも忘れるので戒めのメモです。

結論

いろんなやり方があると思うのですが、ぼくはこれが基本です。
作業中のブランチ名は`master-cron`とします。

#作業中のブランチを確認
git branch
* master-cron
  master

#ステータスを確認
git status

#addする
git add `*`とか`意図したファイル名`

#ステータスを確認してaddされているか確認する
git status

#commitする
git commit -m "modify ファイル名"

#ステータスを確認してcommitされたことを確認する
git status

#作業中のブランチを改めて確認
git branch
* master-cron
  master

#pushする
git push origin master-cron

おまけ

日常的に使ってないとcloneまで忘れる。。

#ブランチをローカルに保存する
git clone リポジトリのURL

#ブランチを切る
git branch ブランチ名

#ブランチの切り替え
git checkout ブランチ名

コンフリクトとかしたら調べて都度対応する感じですね!

簡単ですが以上です。

0
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
0
1