Basic Terms
- Repository (Repo): A folder where your project lives, with all its files and history.
- Commit: Save a snapshot of your project at a specific point in time.
- Push: Upload your local changes to GitHub.
- Pull: Download the latest changes from GitHub to your computer.
- Clone: Copy a GitHub repository to your computer.
- Branch: A separate version of your project (like a parallel universe).
- Merge: Combine changes from one branch into another.
- Fork: Make a copy of someone else’s repository to your GitHub account.
- Pull Request (PR): Ask to merge your changes into someone else’s project.
- Issue: A to-do item or bug report for your project.
- Release: A packaged version of your app (e.g.,
.apk
or.aab
files) for users to download. - Tag: A bookmark for a specific version of your project (e.g.,
v1.0.0
).
Git Commands in Simple Terms
git init
: Start tracking a folder with Git.git add
: Stage changes (prepare them to be saved).git commit
: Save your changes with a message.git push
: Upload your changes to GitHub.git pull
: Download the latest changes from GitHub.git clone
: Copy a GitHub repository to your computer.git branch
: Create, list, or delete branches.git checkout
: Switch to a different branch or version.git merge
: Combine changes from one branch into another.git status
: See what’s changed in your project.git log
: See the history of your project.git tag
: Mark a specific version of your project.git push --force origin main
: In Android Studio terminal, to forcibly make changes of local folder to Git. Needed if other changes on Github project already which demand pull first and we want to ignore them.
GitHub Features in Simple Terms
- Repository: Your project’s home on GitHub.
- README.md: A file that describes your project (like a welcome note).
- Issues: A to-do list or bug tracker for your project.
- Pull Request: A request to add your changes to someone else’s project.
- Actions: Automate tasks like building your app or running tests.
- Releases: Packaged versions of your app for users to download.
- Fork: Copy someone else’s project to your account.
- Star: Bookmark a repository you like.
- Watch: Get notified when a repository changes.
- Gist: Share small snippets of code or text.
Common Scenarios in Simple Terms
- Save Your Work: Use
git add
,git commit
, andgit push
. - Get the Latest Version: Use
git pull
. - Start a New Feature: Create a branch with
git branch
orgit checkout -b
. - Combine Changes: Use
git merge
or create a Pull Request. - Undo Changes: Use
git checkout
orgit revert
. - Share Your App: Create a Release and upload your
.apk
or.aab
file. - Work with Others: Fork their repository, make changes, and send a Pull Request.
GitHub Workflow in Simple Steps
- Create a Repository: Make a home for your project on GitHub.
- Clone the Repository: Copy it to your computer with
git clone
. - Make Changes: Edit files in your project.
- Save Your Work: Use
git add
,git commit
, andgit push
. - Share Your Work: Create a Pull Request or Release.
- Collaborate: Fork, branch, and merge changes with others.
GitHub Actions in Simple Terms
- Workflow: A set of automated tasks (e.g., build your app).
- Trigger: What starts the workflow (e.g., a push or tag).
- Job: A task in the workflow (e.g., build the app).
- Step: A single action in a job (e.g., run a command).
- Artifact: A file created by the workflow (e.g.,
.apk
file).
GitHub Releases in Simple Terms
- Tag: A version number for your project (e.g.,
v1.0.0
). - Release: A packaged version of your app with notes and files.
- Assets: Files included in the release (e.g.,
.apk
or.aab
).
GitHub for Android Developers in Simple Terms
- Save Code: Use
git commit
andgit push
. - Build Your App: Use GitHub Actions to automate builds.
- Share Your App: Create a Release and upload your
.apk
or.aab
file. - Track Bugs: Use Issues to manage bugs and features.
- Collaborate: Use Pull Requests to review and merge changes.
One-Line Summary of GitHub
GitHub is like a time machine for your code that lets you save, share, and collaborate on projects with others.