How To Upload Android Studio Code To Github
Table of contents
- Step 1 - Sign Upwardly GitHub and Install Git
- Step 2 - Enable Version Control Integration
- Step 3 - Share Projection on GitHub
- Make Changes to Your Files
- Stride one - Commit your files
- Step 2 - Push button your files
- Evidence Diff Earlier Commit
- Step 1 - Bear witness Unequal
- Footstep 2 - Select "pace-by-step viewer"
- Step 3 - Review and Brand Changes
The good thing about using Android Studio to upload your files to GitHub is it automatically figures out for you what files are required to commit and push to GitHub. For example, generated files are not required to commit and push to GitHub.
The post-obit provides the stride-by-step instructions on how yous can upload your Android studio projects to GitHub:
Step 1 - Sign Up GitHub and Install Git
- Sign up github.com
- Download and install git from here
Footstep 2 - Enable Version Control Integration
-
In your Android Studio, get to menu "VCS→Enable Version Control Integration..."
-
Select "Git" and click "OK"
Update: February 8, 2022: I learned that the .idea
folder is unnecessary to be committed to repository because those files are specific to IDE configurations, which could exist different per programmer. In this case, you can update the .gitignore
file to exclude them.
- Update
.gitignore
to ignore the entire.idea
folder (optional step)
In your root project binder, you should see .gitignore
which have the following default ignore for certain files and folders in the .idea
folder.
Replace these
/.thought/caches /.idea/libraries /.idea/modules.xml /.thought/workspace.xml /.idea/navEditor.xml /.idea/assetWizardSettings.xml
With
/.idea
To ignore the unabridged .idea
folder instead.
-
Go to menu "Git→GitHub→Share Project on GitHub"
-
Login GitHub account either via GitHub website or with token. GitHub website login didn't piece of work for me. So I ended up use token instead.
-
Click "Generate..." and follow the instructions to get the generated token
-
Copy and paste the token, click "Add Business relationship"
-
Name your repository name, bank check "Private" if y'all desire to create a individual repository. Then, click "Share". A new repository is created.
-
Click "Add" to commit your files
That is it. Your project now has been uploaded to your GitHub repository. After you make some local changes to your file, you demand to commit and push those changes into a GitHub repository. The post-obit steps show y'all how to exercise that.
Make Changes to Your Files
Step ane - Commit your files
- Click "commit" in the top correct corner. Yous can also become to menu "Git→Commit"
Step ii - Push your files
-
Enter your commit description and click "Commit and Push..."
-
There are code analysis warnings, you tin either review them or just go ahead to push button your files
-
Click "Button". Your files have been updated in the repository
-
You lot tin can besides click "Commit" and push your files subsequently on. To push your files, click "push" in the pinnacle right corner. You tin also go to menu "Git→Push". The residual of the steps are very like to "Commit and Push" above.
Another common thing I do before I commit the files is review my changes. The post-obit steps show you how you can review and make any changes to your files in the committing screen.
Prove Diff Before Commit
Step i - Bear witness Unequal
- Select a file, right click and click "Show Diff"
Pace 2 - Select "stride-past-step viewer"
- By default, information technology is "Unified viewer" which I don't similar.
Stride 3 - Review and Make Changes
- At present you lot can review your change. You tin can too make changes to your file from this window.
Hope this helps! I'g new to GitHub and this is what I practise to commit and push button my Android projects into my GitHub repositories
Did you lot find this article valuable?
Support Vincent Tsen past becoming a sponsor. Any amount is appreciated!
Source: https://vtsen.hashnode.dev/how-to-upload-android-studio-project-to-github
Posted by: jacksontheyeard.blogspot.com
0 Response to "How To Upload Android Studio Code To Github"
Post a Comment