Skip to main content

Section 13.6 Git Commands

While some tools like GitHub Desktop offer a graphical interface, many developers use Git through the command line, a text-based way to interact with your computer. It might feel unfamiliar at first, but it gives you a lot of control and speed once you get the hang of it. To use Git this way, youโ€™ll open a terminal (on macOS/Linux) or Git Bash (on Windows), then type commands to tell Git what to do, like checking the status of your files or pushing your changes to GitHub.
Below is a list of some of the most common Git commands youโ€™ll use as you start working with version control:

Note 13.6.1.

๐Ÿ’ก Tip: You donโ€™t have to memorize everything! Start with a few commands and build up as you go.
Figure 13.6.2. Step-by-step workflow for writing, committing, and sharing code using GitHub and VS Code.

Subsection 13.6.1 Learning to Use Git Like a Pro

Git is a powerful tool for managing your work. While itโ€™s most commonly used for tracking code, itโ€™s not limited to that. Git can be used to version and manage all kinds of files, including Word documents, spreadsheets, and other types of content. Itโ€™s essentially a smart file management and backup system that helps you track changes over time, recover earlier versions, and collaborate with others more effectively.
Like any tool, Git works best when you understand how to use it properly. Just as youโ€™d turn to a user manual to operate a piece of equipment or troubleshoot an issue, developers frequently consult Git documentation to understand commands, resolve errors, or learn new techniques.
Youโ€™re not expected to memorize everything. Instead, part of being an effective problem solver is knowing how to find and use the right resources when you need them. This habit isnโ€™t just about using Git, its a core part of problem solving in general: identifying the challenge, exploring resources, and applying what you learn to find a solution.
To practice the basics follow this step by step how to git tutorial. For the complete documentation refer to the git official website and the Pro Git book.
You have attempted of activities on this page.