{"slug": "understanding-the-git-workflow-working-directory-staging-commit-and-push", "title": "Understanding the Git Workflow: Working Directory, Staging, Commit and Push", "summary": "A developer at Lux Dev HQ shared a beginner's guide to the Git workflow, covering the working directory, staging area, commit, and push. The post explains how to set up a GitHub account, install Git, and use basic commands to track project changes.", "body_md": "Git or GitHub was just another buzzword that for so long I used to associate it with the so called \"tech bros and siz\". As a result, I never got quite interested in understanding these concepts. However, my passion towards learning data science and analytics, has brought it right before me, and I have had to throw myself in it. In the last two weeks, I began my classes, on Data Science, Analytics and AI, at Lux Dev HQ. Here, I have been exposed to a number of tools to be used in the program, with Git, and GitHub being one of the most important ones. Over the two weeks, the onboarding sessions have helped me understand git workflow including creating a working directory, staging, commit and push. Here is a step by step process through which I managed to set up my git account.\n\nFirst things first, and this case, we had to understand what git and git hub really is. From the lesson, Git is basically a version control systems installed on the computer that tracks changes made within a project. On the other hand, git hub refers to an online platform allowing users to store their git repositories and this could be easily accessed through [[https://github.com/](https://github.com/)]. Apart from just storing repositories, GitHub allows for ease of project sharing, collaboration, and code review.\n\nFirst things first, I had to create a GitHub account online, using my email address, password and then created a user name for the GitHub profile. Once the online GitHub account was ready, the next step was to install git on the personal computer. However, we had to first confirm if git was already installed on the computer. In this case, the first step was to open the PowerShell, since I was using Windows OS (Operating System) then run *git --version.* In the event Git hub is installed, the following command pops up.\n\n```\ngit version 2.55.0.windows.5\nPS\nC:\\\\WINDOWS\\\\System32>\n```\n\nOne of the critical aspects to understand in git is a working directory. The working directory represents a folder where the terminal is currently operating inside. Basically, the working directory is considered as the workspace where, a user can be able to create, and edit files. Ideally, we can say that this is where most of the real work happens such as opening a file and making changes using the code editors.\n\nMoving on from the working directory is the staging area. We could also call it the preparation zone as well as the midpoint between the workspace and the permanent storage. In this area, what happens is preparing and organizing changes before committing them eventually. In other words, we could call it a draft of the next commit. Moreover, files in the staging area are ready to be committed however, they haven't been saved permanently.\n\nNow that we have already mentioned commit, lets get into what it actually means in git. A basic definition of the term is that, commit is a way of Git to save the current state of a project. This could be interpreted as the saving point of any project to capture the progress at that specific point. Once a commit has been created, git permanently stores it in the repository. Therefore, it is easy to determine how a project looked at a particular point. Moreover, what has been prepared during the staging area, is now permanently saved.\n\nOnce a commit has been done, what follows is transfer it to the remote repository. This action is only possible, through the push command on GitHub. This happens with the following command\n\n```\ngit add.\ngit commit -m \"Your commit message\"\ngit push origin main\n```\n\n", "url": "https://wpnews.pro/news/understanding-the-git-workflow-working-directory-staging-commit-and-push", "canonical_source": "https://dev.to/victor_muyanzi_baac695cf9/understanding-the-git-workflow-working-directory-staging-commit-and-push-38ll", "published_at": "2026-08-28 09:34:57+00:00", "updated_at": "2026-08-28 10:19:23.637878+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Git", "GitHub", "Lux Dev HQ"], "alternates": {"html": "https://wpnews.pro/news/understanding-the-git-workflow-working-directory-staging-commit-and-push", "markdown": "https://wpnews.pro/news/understanding-the-git-workflow-working-directory-staging-commit-and-push.md", "text": "https://wpnews.pro/news/understanding-the-git-workflow-working-directory-staging-commit-and-push.txt", "jsonld": "https://wpnews.pro/news/understanding-the-git-workflow-working-directory-staging-commit-and-push.jsonld"}}