Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Git Tutorial
  • Git Exercises
  • Git Basic Commands
  • Git Cheat Sheet
  • Git Interview Questions
  • Git Bash
  • GitHub
  • Git Branch
  • Git Merge
  • Git WorkFlow
  • Git Hooks
  • Git LFS
  • Git Rebase
  • Git Cherry Pick
Open In App
Next Article:
How to Use Git Commands in Android Studio Terminal?
Next article icon

How to Use Git Commands in Android Studio Terminal?

Last Updated : 27 Mar, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

Android Studio is the official IDE (Integrated Development Environment) for Android app development and it is based on JetBrains’ IntelliJ IDEA software. Git is a Distributed Version Control System. It is used in Software Development. Git was developed by Linus Torvalds in the year 2005 to manage the development of the Linux Kernel

Need of Git

Git allows multiple developers to work on the same project simultaneously and also, keep track of the changes made to the codebase over time or version revisions.

Common Git Commands

1. git init

initializes a new git repository

2. git add <file>

adds file(s) to the staging area

3. git commit -m <message>

commits the changes in the staging area to the repository with a descriptive message

4. git status

shows the status of the current working tree, indicating which files have been modified, added, or deleted

5. git pull

fetches and merges change from the remote repository into the local repository

6. git push

pushes the committed changes to the remote repository

7. git branch

lists all the branches in the current repository 

8. git checkout -b <branch-name>

creates a new branch with the specified name

9. git checkout <branch-name>

changes current working branch

10. git clone <repository-url>

clones an existing git repository from the specified GitHub Url

11. git merge <branch-name>

merges the specified branch into the current branch

12. git log

shows the commit history of the repository

13. git remote add <remote-url>

to add a remote repository as the default remote for your local repository

Android Studio Terminal

Android Studio comes with an embedded terminal. A terminal is a powerful tool that is used to execute command-line commands and tasks like building applications, running tests, and managing project dependencies

Below is the step-by-step video for executing git commands in Android Studio Terminal


Next Article
How to Use Git Commands in Android Studio Terminal?

A

anas4112002
Improve
Article Tags :
  • Git
  • Android

Similar Reads

    How to Use Git Shell Commands?
    Git is a powerful version control system that is important for managing source code in modern software development. While there are many graphical user interfaces (GUIs) available for Git, mastering Git shell commands can significantly enhance your productivity and control over your repositories. Th
    3 min read
    How to Change Git Username in Terminal?
    Suppose you're using Git for version control. In that case, you might want to change your Git username for various reasons—whether it's for correcting a typo, updating it to a new username, or switching to a different account. You can change your Git username in two ways:Globally: This sets the user
    3 min read
    How to Install and Use Git in Google Colab?
    Google Colab is a popular platform for data scientists and machine learning enthusiasts to write and execute Python code in a Jupyter Notebook environment. While it provides a robust environment for coding, integrating version control systems like Git can enhance productivity by allowing you to trac
    2 min read
    How to Upload Project on GitHub from Android Studio?
    Learning how to upload a project to GitHub from Android Studio is an essential skill for developers, as it allows you to share your code, collaborate with others, and manage version control. With GitHub integration in Android Studio, it's easy to push your project to a repository. This guide will wa
    3 min read
    How To Fix "Unable To Show a Git Tree in Terminal"?
    Git is an important tool for version control, and displaying the Git tree in the terminal is a common way to visualize your branch structure, history, and commits. However, you might sometimes encounter an error saying "Unable to show a Git tree in terminal" which can be frustrating.In this article,
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences