How to Upload a Android Project in Github
Table of contents
- Pace 1 - Sign Upwardly GitHub and Install Git
- Step 2 - Enable Version Command Integration
- Pace 3 - Share Project on GitHub
- Make Changes to Your Files
- Stride 1 - Commit your files
- Step two - Push your files
- Show Diff Before Commit
- Step 1 - Show Unequal
- Step 2 - Select "step-by-stride viewer"
- Step 3 - Review and Brand Changes
The expert thing about using Android Studio to upload your files to GitHub is information technology automatically figures out for y'all what files are required to commit and push to GitHub. For case, generated files are not required to commit and push to GitHub.
The post-obit provides the step-past-stride instructions on how y'all can upload your Android studio projects to GitHub:
Pace 1 - Sign Up GitHub and Install Git
- Sign upwards github.com
- Download and install git from here
Step ii - Enable Version Control Integration
-
In your Android Studio, become to menu "VCS→Enable Version Control Integration..."
-
Select "Git" and click "OK"
Update: Feb viii, 2022: I learned that the .thought
folder is unnecessary to be committed to repository because those files are specific to IDE configurations, which could be dissimilar per developer. In this instance, you lot can update the .gitignore
file to exclude them.
- Update
.gitignore
to ignore the entire.idea
folder (optional pace)
In your root projection folder, you lot should see .gitignore
which take the following default ignore for sure files and folders in the .idea
binder.
Replace these
/.idea/caches /.idea/libraries /.idea/modules.xml /.idea/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 work for me. So I ended upwards apply token instead.
-
Click "Generate..." and follow the instructions to get the generated token
-
Copy and paste the token, click "Add together Business relationship"
-
Name your repository name, bank check "Private" if you want to create a individual repository. And so, click "Share". A new repository is created.
-
Click "Add together" 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 need to commit and push those changes into a GitHub repository. The following steps bear witness you how to do that.
Brand Changes to Your Files
Footstep one - Commit your files
- Click "commit" in the top right corner. You can too get to menu "Git→Commit"
Step two - Push your files
-
Enter your commit description and click "Commit and Push..."
-
In that location are code analysis warnings, you tin can either review them or only get ahead to push button your files
-
Click "Push button". Your files have been updated in the repository
-
You tin also click "Commit" and push your files afterward on. To push your files, click "push" in the height right corner. You can also go to card "Git→Push". The rest of the steps are very similar to "Commit and Push" to a higher place.
Another common matter I do before I commit the files is review my changes. The post-obit steps bear witness you how y'all tin review and make any changes to your files in the committing screen.
Show Diff Before Commit
Step 1 - Show Diff
- Select a file, right click and click "Show Diff"
Footstep 2 - Select "pace-by-step viewer"
- By default, it is "Unified viewer" which I don't like.
Step 3 - Review and Make Changes
- At present y'all can review your modify. You can also make changes to your file from this window.
Hope this helps! I'thousand new to GitHub and this is what I do to commit and button my Android projects into my GitHub repositories
Did you find this commodity valuable?
Support Vincent Tsen past condign a sponsor. Any amount is appreciated!
Source: https://vtsen.hashnode.dev/how-to-upload-android-studio-project-to-github
Belum ada Komentar untuk "How to Upload a Android Project in Github"
Posting Komentar