のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

originのurlを変える

$git remote add origin git@bitbucket.org:user01/android7.0-minikin.git
fatal: remote origin already exists.
$git remote -v
origin	https://android.googlesource.com/platform/frameworks/minikin/ (fetch)
origin	https://android.googlesource.com/platform/frameworks/minikin/ (push)
$git remote set-url origin git@bitbucket.org:user01/android7.0-minikin.git

$git remote -v
origin	git@bitbucket.org:user01/android7.0-minikin.git (fetch)
origin	git@bitbucket.org:user01/android7.0-minikin.git (push)
あなたのコンピュータ上に既にGitリポジトリがあるのなら、Bitbucketにプッシュしましょう。
cd /path/to/my/repo
git remote add origin git@bitbucket.org:lim_fujii/android7.0-minikin.git
git push -u origin --all # pushes up the repo and its refs for the first time
###git push origin --tags # pushes up any tags
$git push origin android-7.0.0_r1

Counting objects: 1, done.
Writing objects: 100% (1/1), 329 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 1 (delta 0)
To git@bitbucket.org:lim_fujii/android7.0-minikin.git
 * [new tag]         android-7.0.0_r1 -> android-7.0.0_r1