Git commands in simple terms

Basic Terms

  1. Repository (Repo): A folder where your project lives, with all its files and history.
  2. Commit: Save a snapshot of your project at a specific point in time.
  3. Push: Upload your local changes to GitHub.
  4. Pull: Download the latest changes from GitHub to your computer.
  5. Clone: Copy a GitHub repository to your computer.
  6. Branch: A separate version of your project (like a parallel universe).
  7. Merge: Combine changes from one branch into another.
  8. Fork: Make a copy of someone else’s repository to your GitHub account.
  9. Pull Request (PR): Ask to merge your changes into someone else’s project.
  10. Issue: A to-do item or bug report for your project.
  11. Release: A packaged version of your app (e.g., .apk or .aab files) for users to download.
  12. Tag: A bookmark for a specific version of your project (e.g., v1.0.0).

Git Commands in Simple Terms

  1. git init: Start tracking a folder with Git.
  2. git add: Stage changes (prepare them to be saved).
  3. git commit: Save your changes with a message.
  4. git push: Upload your changes to GitHub.
  5. git pull: Download the latest changes from GitHub.
  6. git clone: Copy a GitHub repository to your computer.
  7. git branch: Create, list, or delete branches.
  8. git checkout: Switch to a different branch or version.
  9. git merge: Combine changes from one branch into another.
  10. git status: See what’s changed in your project.
  11. git log: See the history of your project.
  12. git tag: Mark a specific version of your project.
  13. 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.
  14. git branch --set-upstream-to=origin/main main: In terminal, set up tracking for main branch. This is useful if Git > Update project, not working in Android Studio.

GitHub Features in Simple Terms

  1. Repository: Your project’s home on GitHub.
  2. README.md: A file that describes your project (like a welcome note).
  3. Issues: A to-do list or bug tracker for your project.
  4. Pull Request: A request to add your changes to someone else’s project.
  5. Actions: Automate tasks like building your app or running tests.
  6. Releases: Packaged versions of your app for users to download.
  7. Fork: Copy someone else’s project to your account.
  8. Star: Bookmark a repository you like.
  9. Watch: Get notified when a repository changes.
  10. Gist: Share small snippets of code or text.

Common Scenarios in Simple Terms

  1. Save Your Work: Use git addgit commit, and git push.
  2. Get the Latest Version: Use git pull.
  3. Start a New Feature: Create a branch with git branch or git checkout -b.
  4. Combine Changes: Use git merge or create a Pull Request.
  5. Undo Changes: Use git checkout or git revert.
  6. Share Your App: Create a Release and upload your .apk or .aab file.
  7. Work with Others: Fork their repository, make changes, and send a Pull Request.

GitHub Workflow in Simple Steps

  1. Create a Repository: Make a home for your project on GitHub.
  2. Clone the Repository: Copy it to your computer with git clone.
  3. Make Changes: Edit files in your project.
  4. Save Your Work: Use git addgit commit, and git push.
  5. Share Your Work: Create a Pull Request or Release.
  6. Collaborate: Fork, branch, and merge changes with others.

GitHub Actions in Simple Terms

  1. Workflow: A set of automated tasks (e.g., build your app).
  2. Trigger: What starts the workflow (e.g., a push or tag).
  3. Job: A task in the workflow (e.g., build the app).
  4. Step: A single action in a job (e.g., run a command).
  5. Artifact: A file created by the workflow (e.g., .apk file).

GitHub Releases in Simple Terms

  1. Tag: A version number for your project (e.g., v1.0.0).
  2. Release: A packaged version of your app with notes and files.
  3. Assets: Files included in the release (e.g., .apk or .aab).

GitHub for Android Developers in Simple Terms

  1. Save Code: Use git commit and git push.
  2. Build Your App: Use GitHub Actions to automate builds.
  3. Share Your App: Create a Release and upload your .apk or .aab file.
  4. Track Bugs: Use Issues to manage bugs and features.
  5. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *