0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ブランチのバックアップを取る方法

Last updated at Posted at 2024-06-04

やり方

1.バックアップを取りたいブランチに移動

$ git branch バックアップを取りたいブランチ名

2.バックアップ用のブランチを作成

$ git branch バックアップ用のブランチ名

3.作成したバックアップ用のブランチをpush

$ gir push origin バックアップ用のブランチ名

Test1というブランチのバックアップをとりたい!
Test1のブランチ(Test1branch:仮名)に移動

git branch Test1branch

バックアップ用のブランチを作成(Test1branch-backup:仮名)

git branch Test1branch-backup

作成したブランチをpush

git push origin Test1branch-backup

GitHubを確認すると、新しくTest1branch-backupブランチが作成されており、それにはバックアップの元のTest1branchの中身が複製されています!

0
0
1

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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?