2
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?

Git localとremoteの紐付けを修正したい

Last updated at Posted at 2024-06-07

事象

local branch をissue/3で作業していたが、git branch -m "issues/3" に変更

ただし、remote branchとの紐付けは変わらず。

git branch -vv                         
* issues/3 e88c928 [origin/issue/3: ahead 3, behind 7] add Makefile

対応

remote branchの紐付けを変更

git branch --set-upstream-to=origin/issues/3 issues/3
branch 'issues/3' set up to track 'origin/issues/3'.

すると、以下のように変更された。

git branch -vv                                       
* issues/3 e88c928 [origin/issues/3] add Makefile

参考

2
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
2
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?