0
1

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 3 years have passed since last update.

gitの運用ルール

Last updated at Posted at 2021-01-24

2021-01-25_06h10_19.png

Gitの流れ

gitの運用ルールに関して備忘。

■最新のdevelopブランチに移動する

git checkout develop
git pull origin develop

■自分のブランチを作る

git checkout -b {自分のブランチ名:future}

■コミット

git add {対応してるファイル}
git commit -m "{コミット名}"

■コミットをまとめる

git rebase -i HEAD~{コミットを実行した回数}

■rebaseして最新のdevelopブランチのコミットを取得する

git pull --rebase origin develop

■pushを実行

git push origin {自分のブランチ名:future}

すでにリモートにプッシュしている場合は-fでコミット履歴を上書きできる。
(1merge1commitなどの運用ルールがある場合利用)
git push -f origin {自分のブランチ名:future}

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?