Hi I have recently made a project in android studio and just want to push it to a repository. I've pulled before but never pushed a brand new one and haven't found a good tutorial as to do so. Whenever I push it will make a Repository folder on Github or Bitbucket but never push any files.
To push the commit from the local repo to your remote repositories, run git push -u remote-name branch-name where remote-name is the nickname the local repo uses for the remote repositories and branch-name is the name of the branch to push to the repository. You only have to use the -u option the first time you push.
Make Changes to Your Files You can also click "Commit" and push your files later on. To push your files, click "push" in the top right corner. You can also go to menu "Git→Push".
1)Create a repository in bitbucket/github.
2)You would get a link like https://blah [email protected]/.../....git
3)Now create the project in Android Studio.On the top menu, select VCS > Import into Version Control > Create Git Repository.
4)After creating it open terminal inside the Studio itself and add a origin u want to push using the following git command git remote add origin https://blah [email protected]/.../....git
5)NOw, right click your projects root directory and select Git > Add
. This will add all your project files to your Git repository.After adding right click the project name again and this time select Git > Commit
Directory.After entering the commit message then finally commit
6)Then finally push it by selecting Git > Repository > Push.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With