6
5

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.

【GitHub】featureブランチを切ってpushする

Posted at

はじめに

前回【GitHub】git-flowについてについて解説しました。
今回は実際にfeatureブランチを切ってpushしたいと思います。

featureブランチを切ってpushする

featureブランチの作成

command
//現在の位置がdevelopブランチか確認
$ git branch 
//feature作成
$ git branch feature/(任意の名称) 
//移動
$ git checkout feature/(任意の名称) 

//※feature作成と移動は合わせて行うこともできます
$ git checkout -b feature/(任意の名称) 

改修後のpushまで

command
//サブディレクトリも含めたファイルをインデックス領域へアップ
$ git add .
//ローカルリポジトリへコミット
$ git commit -m "message" 
//feature/(任意の名称)ブランチの内容をoriginへアップロード
$ git push origin feature/(任意の名称) 

さいごに

ブランチ切ってpushするところまでわかれば基本的なGitHubの操作は問題ないかなと思います。

6
5
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
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?