Last active
December 12, 2019 12:44
-
-
Save donchan922/f2604d99eb4f7afed6068f6b3dddd896 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 古いリポジトリ: old-repository | |
# 新しいリポジトリ: new-repository | |
# 古いリポジトリをクローンする | |
$ git clone https://github.com/donchan922/old-repository.git | |
$ cd old-repository | |
# 古いリポジトリのコミット履歴を確認する(新しいリポジトリにコミット履歴は引き継がない) | |
$ git log --oneline | |
f67d177 (HEAD -> master, origin/master, origin/HEAD) third commit | |
8c0864b second commit | |
56f1635 Initial commit | |
# 古いリポジトリのGitの更新情報を削除する | |
$ rm -rf .git | |
# 新しいリポジトリを新規作成する | |
$ git init | |
$ git add . | |
$ git commit -m "Initial commit" | |
$ git remote add origin https://github.com/donchan922/new-repository.git | |
# 新しいリポジトリのコミット履歴を確認する(古いリポジトリのコミット履歴を引き継いでいない) | |
$ git log --oneline | |
c27e612 (HEAD -> master, origin/master) Initial commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment