abhinav / abhinav/git-spice

Better workflow for renaming remote branches

オープン
#655 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Go
スター
762
フォーク
72
平均マージ
18時間 24分
マージ済み PR(30日)
28

説明

gs branch rename only renames the local branch, and leaves the remote alone.
AFAIK there's no way to rename the remote ref without deleting and re-pushing.

Right now, if a user wants to rename the local branch and the remote, the workflow is:

```
git push --delete origin $oldName
gs branch untrack
gs branch track
gs branch submit
```

Without the `untrack`/`track`, the git-spice state will still remember `$oldName` as the remote name for the branch and attempt to push to it.
This behavior was intentional, so as not to accidentally disconnect from PRs after pushing a branch.
However, as evident above, this makes the case where the user _does_ want to rename the branch (maybe because they haven't created a PR) annoying.

Some options:

- in `gs branch rename`, if the branch doesn't have a PR associated, offer to rename the remote
- if we can determine in `gs branch submit` that the remote ref was deleted (maybe since we use `--force-with-lease`), use that knowledge to offer to use the new remote name

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。