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 2020-08-01

一連の流れ!

$ git clone < url >
$ git checkout develop
$ git pull
$ git checkout -b < branch name >
$ git status
$ git add < file >
$ git commit -m "< commit message >"
$ git pull --rebase origin develop
  if conflict then
  $ git add < fixed file >
  $ git rebase --continue
$ git push origin < local branch > #ローカルからリモートブランチ作成
" GitHubのWEB-UIでpull request送信 "
$ git checkout develop
$ git pull
$ git branch -d < branch name > #ローカルブランチ削除
$ git push --delete origin < branch name > #リモートブランチ削除

その他コマンド

$git branch #ローカルブランチ確認
$git branch -a #全てのブランチ確認
$git branch -r #リモートブランチ確認
$git branch -u origin/< branch name > #現在のブランチが、< branch name >で指定したリモートブランチを追跡
$git checkout -b < local_branch_name > origin/< remote_branch_name > #リモートブランチをローカルにcheckout
$git branch -d -r origin/< branch name > #リモートブランチ削除(ローカル側)
$ git remote prune [リモート名] #Gitで、リモートリポジトリで削除済みの不要なブランチをローカルから削除する方法

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?