{"id":757,"date":"2017-03-06T00:00:00","date_gmt":"2017-03-06T00:00:00","guid":{"rendered":"http:\/\/blog.hostinger.io\/hostinger-tutorials\/uncategorized\/basic-git-commands\/"},"modified":"2026-03-10T09:31:22","modified_gmt":"2026-03-10T09:31:22","slug":"basic-git-commands","status":"publish","type":"post","link":"\/ca\/tutorials\/basic-git-commands","title":{"rendered":"Most used Git commands from basic to advanced"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>Git commands let you interact with the version control system to manage repositories and track changes. You can use them to create, modify, and sync repositories between your local development environment and remote codebases, streamlining your workflow.<\/p><p>The most basic Git commands let you initialize a new repository, stage changes for commits, and check the status of modifications. Additional commands help you manage branches, merge code, and tag specific versions for easy identification.<\/p><p>Git also provides commands for interacting with remote repositories, allowing you to clone codebases or connect to platforms like GitHub. Advanced commands, such as blame and bisect, help with specific tasks like debugging and tracking down issues in your code history.<\/p><p>Start by exploring the basic Git commands for essential tasks, then move on to commands for managing branches, remote repositories, and advanced features.<\/p><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-basic-git-commands\">Basic Git commands<\/h2><p>Basic Git commands are used to create, manage, and track changes within a repository. These commands form the foundation of version control, helping you record your project&rsquo;s history and making them essential when <a href=\"\/ca\/tutorials\/git-tutorial\">learning about Git<\/a>. They include:<\/p><div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<ul class=\"wp-block-list\">\n<li><strong>git init command<\/strong><br>Initializes a new Git repository within a directory. Using it without a <strong>[name]<\/strong> will initialize a repo using the current directory&rsquo;s name:<\/li>\n<\/ul>\n<\/div><\/div><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git init [name]<\/pre><ul class=\"wp-block-list\">\n<li><strong>git add command<\/strong><br>Stages file changes, preparing them for the next commit:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git add &lt;filename&gt;<\/pre><ul class=\"wp-block-list\">\n<li><strong>git commit<\/strong><br>Saves staged changes to the local repository (a process called a <strong>commit<\/strong>) and can include a descriptive message about the modifications:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git commit -m \"your commit message\"<\/pre><ul class=\"wp-block-list\">\n<li><strong>git status<\/strong><br>Shows the current state of your working directory and staging area, including which files have been modified, staged, or are untracked:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git status<\/pre><ul class=\"wp-block-list\">\n<li><strong>git log<\/strong><br>Displays a chronological list of commits in the current repository, showing details such as commit messages, authors, and timestamps:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git log<\/pre><ul class=\"wp-block-list\">\n<li><strong>git diff<\/strong><br>Shows the differences between items in various states of a repository, such as your current working directory and the most recent commit:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git diff [file-branch-directory-or-commit] [file-branch-directory-or-commit]<\/pre><ul class=\"wp-block-list\">\n<li><strong>git rm<\/strong><br>Removes files from your working directory and stages the removal for the next commit:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git rm &lt;filename&gt;<\/pre><ul class=\"wp-block-list\">\n<li><strong>git mv<\/strong><br>Renames or moves files within your working directory. It behaves similarly to Linux&rsquo;s mv command and has a similar syntax:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git mv &lt;filename&gt; &lt;filename-or-directory&gt;<\/pre><ul class=\"wp-block-list\">\n<li><strong>git config<\/strong><br>Changes the settings of various aspects of your Git installation, including user information and preferences. For example, use this to set your email address for commits:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git config --global user.email \"your.email@example.com\"<\/pre><p><div class=\"protip\">\n                    <h4 class=\"title\">&#128161;Prefer using a graphical interface?<\/h4>\n                    <p>While commands offer flexibility and efficiency, some users prefer using a graphical user interface (GUI) to visualize how version control works. In this case, consider using one of the <a href=\"\/ca\/tutorials\/best-git-gui-clients\">best Git GUI clients<\/a>. <\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-git-branching-and-merging-commands\">Git branching and merging commands<\/h2><p>&ldquo;Branching and merging commands let you work on different features or fixes simultaneously. They make it easy to integrate changes and maintain a clean, organized project history.<\/p><ul class=\"wp-block-list\">\n<li><strong>git branch<\/strong><br>Manages branches in your Git repository. For example, you can list, create, or <a href=\"\/ca\/tutorials\/how-to-rename-a-git-branch\/\">rename a branch<\/a>. Run this command as-is to list all branches:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git branch [--options] [branch-name]<\/pre><ul class=\"wp-block-list\">\n<li><strong>git checkout<\/strong><br>Switches between branches and restores files from different commits. Here&rsquo;s an example to switch to an existing branch:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git checkout branch_name<\/pre><ul class=\"wp-block-list\">\n<li><strong>git merge<\/strong><br>Combines a feature or topic branch into the main branch. Below is an example of basic git merge usage:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git merge branch_name<\/pre><ul class=\"wp-block-list\">\n<li><strong>git cherry-pick<\/strong><br>Applies specific commits from one branch to another without merging an entire branch. It selects a specific commit using its hash:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git cherry-pick commit_hash<\/pre><ul class=\"wp-block-list\">\n<li><strong>git rebase<\/strong><br>Applies changes from one branch to another by moving or combining commits, helping maintain a cleaner commit history. For example, this will apply commits from your current branch to the main branch:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git rebase main<\/pre><ul class=\"wp-block-list\">\n<li><strong>git tag<\/strong><br>Marks specific points in your Git history, such as version releases like v1.0 or v2.0. An example command looks like this:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git tag v1.0<\/pre><h2 class=\"wp-block-heading\" id=\"h-git-remote-repository-commands\">Git remote repository commands<\/h2><p>Remote commands connect your local repository to external ones like <a href=\"\/ca\/tutorials\/what-is-github\">GitHub<\/a> or GitLab. They allow you to share your work, collaborate with others, and synchronize changes between environments.<\/p><ul class=\"wp-block-list\">\n<li><strong>git clone<\/strong><br>Creates a copy of a remote repository on your local machine. For example, the most common git clone usage is to download a repository from GitHub:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git clone https:\/\/github.com\/username\/my-project.git<\/pre><ul class=\"wp-block-list\">\n<li><strong>git push<\/strong><br>Sends your local branch commits to a remote repository, updating it with your latest changes. For example, to push changes from the local &ldquo;main&rdquo; branch to the remote repository named &ldquo;origin&rdquo;:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git push origin main<\/pre><ul class=\"wp-block-list\">\n<li><strong>git pull<\/strong><br>Fetches and integrates changes from a remote repository into your current local branch. Here&rsquo;s an example to pull changes from the master branch:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git pull origin master<\/pre><ul class=\"wp-block-list\">\n<li><strong>git fetch<\/strong><br>Retrieves new commits from a remote repository without automatically merging them into your current branch. Here&rsquo;s an example:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git fetch origin<\/pre><ul class=\"wp-block-list\">\n<li><strong>git remote<\/strong><br>Manages remote repositories associated with your local repository. Running the basic syntax will list remote repositories, but you can add options and subcommands to complete other tasks:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git remote [options] [subcommand] [args]<\/pre><ul class=\"wp-block-list\">\n<li><strong>git submodule<\/strong><br>Manages separate repositories embedded within a Git repository. For example, use this to add a submodule to your main repository:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git submodule add https:\/\/github.com\/username\/submodule-repo.git submodule\/path\/on\/main-repo<\/pre><h2 class=\"wp-block-heading\" id=\"h-advanced-git-commands\">Advanced Git commands<\/h2><p>Advanced commands offer greater control over your repository&rsquo;s history and workflow. They&rsquo;re used for tasks like rewriting commits, troubleshooting issues, and optimizing project structure.<\/p><ul class=\"wp-block-list\">\n<li><strong>git reset<\/strong><br>Undoes changes and manipulates the commit history, useful when recent modifications contain an error. Here&rsquo;s a basic example to unstage changes made to a file:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git reset &lt;filename&gt;<\/pre><ul class=\"wp-block-list\">\n<li><strong>git stash<\/strong><br>Temporarily saves changes that aren&rsquo;t yet ready to be committed. You can add subcommands like <code>list<\/code> to view stored changes and <code>pop<\/code> to reapply them to your working directory:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git stash [subcommand]<\/pre><ul class=\"wp-block-list\">\n<li><strong>git bisect<\/strong><br>Identifies bugs or issues in your project&rsquo;s history through a binary search process. Use this to start the bisecting process:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git bisect start<\/pre><ul class=\"wp-block-list\">\n<li><strong>git blame<\/strong><br>Identifies the most recent change to each line of a file and the associated author. This is helpful for tracking down when and by whom specific changes were made:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git blame file1.txt<\/pre><ul class=\"wp-block-list\">\n<li><strong>git reflog<\/strong><br>Shows a log of reference updates in your repository, allowing you to track your repository&rsquo;s history, even when commits appear to be deleted or lost:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git reflog<\/pre><ul class=\"wp-block-list\">\n<li><strong>git clean <\/strong><br>Removes untracked files or directories from your working directory, helpful for organizing your repository. For safety, use the <code>-n<\/code> option first to preview what will be deleted, then confirm with the <code>-f<\/code> option:<\/li>\n<\/ul><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git clean [options]<\/pre><h2 class=\"wp-block-heading\" id=\"h-git-commands-cheat-sheet\">Git commands cheat sheet<\/h2><p>If you&rsquo;re just starting out, remembering Git commands can be challenging. To help you master this tool, we&rsquo;ve created a <a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Git-Cheat-Sheet-EN.pdf\" target=\"_blank\" rel=\"noopener\">Git cheat sheet<\/a> you can download or print out. Keep it handy whenever you need a quick reference for Git commands.<\/p><h2 class=\"wp-block-heading\" id=\"h-what-is-the-easiest-way-to-install-git-on-ubuntu\">What is the easiest way to install Git on Ubuntu?<\/h2><p>The simplest way to <a href=\"\/ca\/tutorials\/how-to-install-git-on-ubuntu\">install Git on Ubuntu<\/a> is using the apt package manager. This works for any Ubuntu version and automatically installs a stable version of Git.<\/p><p>If you need a specific version of Git, you can build it from source by downloading the installation package from its GitHub repository. However, this method is more complicated.<\/p><p>Regardless of the installation method, you&rsquo;ll need to configure Git with your user information and connect to your remote repository account, such as GitHub or GitLab.<\/p><p>Both methods work on all Ubuntu systems, whether desktop or server versions. If you&rsquo;re using a hosting provider, they may offer one-click installation or other tools that simplify the process.<\/p><h3 class=\"wp-block-heading\">How can Hostinger simplify Git installation?<\/h3><p>If you use the <a href=\"\/ca\/vps-hosting\">Hostinger VPS solution<\/a>, you can ask our AI assistant Kodee to provide the Git installation commands. Simply open hPanel and type, &ldquo;<strong>Give me the commands for installing Git and connecting my GitHub account<\/strong>.&rdquo;<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1c87ed70d4\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2017\/03\/kodee-vps-ai-assistant-provides-commands-for-installing-and-configuring-git-641x1024.png\" alt=\"Kodee VPS AI assistant writes commands for installing and configuring Git on Ubuntu\" class=\"wp-image-135830\"  sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Then, connect to your Hostinger server using <strong>PuTTY<\/strong> or our <strong>Browser terminal<\/strong> and run the provided commands. If you use other Hostinger web hosting plans, you can also <a href=\"\/support\/1583302-how-to-deploy-a-git-repository-in-hostinger\/\">connect your repository to your website via hPanel<\/a> for easy deployment.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/ca\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner-1024x300.png\" alt=\"\" class=\"wp-image-77934\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-from-commands-to-contributions-how-popular-repositories-use-git-at-scale\">From commands to contributions: How popular repositories use Git at scale<\/h2><p>After understanding the essential Git commands, the next step is to practice by managing personal projects. This is the best way to get comfortable with these tools before working on real-world repositories at scale.<\/p><p>Mastering Git commands becomes crucial when managing large-scale projects with many contributors. Versioning commits, branches, and repositories lets you track changes effectively, identify issues quickly, and revert problematic changes as needed. The result is a more streamlined development process.<\/p><p>For example, some of the most popular and <a href=\"\/ca\/tutorials\/most-popular-github-repos\">best GitHub repositories<\/a> have thousands of contributors pushing changes daily. Check them out to see how large-scale projects use Git commands effectively in practice.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Git commands let you interact with the version control system to manage repositories and track changes. You can use them to create, modify, and sync repositories between your local development environment and remote codebases, streamlining your workflow. The most basic Git commands let you initialize a new repository, stage changes for commits, and check the [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ca\/tutorials\/basic-git-commands\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":411,"featured_media":140113,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"Git commands for repository management + Free cheat sheet","rank_math_description":"Starting out with Git? Learn basic Git commands and get a handy Git cheat sheet every developer should have.","rank_math_focus_keyword":"git commands","footnotes":""},"categories":[22701,22699],"tags":[],"class_list":["post-757","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pre-installed-applications","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/basic-git-commands","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/comandos-git","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/commandes-git","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/comandos-de-git","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/perintah-git-dasar","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/basic-git-commands","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/basic-git-commands","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/basic-git-commands","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/comandos-de-git","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/joomla-vs-wordpress-cms-utilizar-17","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/comandos-de-git","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/comandos-git","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/basic-git-commands","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/basic-git-commands","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/basic-git-commands","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/basic-git-commands","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/users\/411"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/comments?post=757"}],"version-history":[{"count":39,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/757\/revisions"}],"predecessor-version":[{"id":140112,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/757\/revisions\/140112"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/media\/140113"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/media?parent=757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/categories?post=757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/tags?post=757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}