LoginSignup
0
0

More than 3 years have passed since last update.

Git/Githubで管理しているAndroid Studioプロジェクトの名前を変更する時の手順

Posted at

この記事は、Git/Githubで管理しているAndroid Studioプロジェクトの名前を変更する時に、軽く梃子摺ったため備忘録として残すものです。
同じ悩みを抱えた人の手助けにもなれば幸いです。

Git/Github関連

Githubの操作

リポジトリ -> settings -> Rename

.git/configを書き換える

対象のリポジトリにある.git/configを弄る

[remote "origin"]
    url = https://github.com/{your name}/hoge.git
    fetch = +refs/heads/*:refs/remotes/origin/*

[remote "origin"]
    url = https://github.com/{your name}/huga.git
    fetch = +refs/heads/*:refs/remotes/origin/*

Android Studio関連

ディレクトリの名前を変更する

Android Studio内部からではなく、エクスプローラーなど外部からプロジェクトのルートディレクトリ名を変更する

プロジェクトを開いてClean Project

この際、settings.gradleに下記の部分があれば書き換えてから実行

rootProject.name = 'hoge'

rootProject.name = 'huga'

確認

git pull origin huga

とかでリポジトリにアクセスできれば終了

参考記事

Android Studioでプロジェクト名を変更する
GitHubのリポジトリ名変更方法

0
0
0

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