Help us understand the problem. What is going on with this article?

[Git/GitHub]branch名を変更したい場合の対処法

はじめに

GitHubでbranch名を変更したいと思い実践したのでアウトプット。

対処法

①ターミナルにて現在登録されているbranchを確認

git branch   

②変更後の新しいbranch名を登録

git push origin '新しいbranch名' #実際にターミナルに入力する際はシングルクォーテーション(' ')は無視して下さい(以下同様)

③変更したいbranch名を削除

git push origin :'変更したいbranch名'

④変更後のbranch名をプッシュ

 git push origin '新しいbranch名'

これで変更できます!参考にして下さい。

nkekisasa222
理念:エンジニアリングを通じて社会と人々の問題を解決し、他者貢献を実現すること/テックキャンプ転職/なんば校/夜間休日77期/希望勤務地:東京都/学習のアウトプットでQiita更新しています
https://github.com/ken-sasaki-222
engineerlife
技術力をベースに人生を謳歌する人たちのコミュニティです。
https://community.camp-fire.jp/projects/view/280040
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした