How to push Android Project to existing private empty repository in github with Android Studio?

后端 未结 3 497
我寻月下人不归
我寻月下人不归 2021-02-05 16:00

I am trying to push android project to private empty repo with android studio . But I cannot find simple solution. How can I do this ?

3条回答
  •  不知归路
    2021-02-05 16:34

    To push an android studio project to an empty git, follow these:

    1. Go to terminal and change working directory to your project root using cd command and enter below commands.
    2. git init
    3. git status -> This would output you list of files in red color.
    4. git add . -> Adds all the files to local version control.
    5. git commit -m "Some Commit Message"
    6. git remote add origin repository_url.git Example: git remote add origin https://github.com/ramakrishnajoshi/JetpackNavigationComponent.git
    7. git push --set-upstream origin master -> A new branch is created with name master and all the code will be pushed to this branch.
    8. Wait till the code is pushed before doing any other operation in terminal.

    After all this, you will get a message similar to Branch master set up to track remote branch master from origin

提交回复
热议问题