{
  "id": 2866920,
  "title": "Understanding Git Workflow from Working Directory, Staging, Commit, and Push.",
  "url": "https://urgent.news/2026/08/23/understanding-git-workflow-from-working-directory-staging-commit-and",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-23T20:34:12.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/expertwriter/understanding-git-workflow-from-working-directory-staging-commit-and-push-4kdi"
  },
  "original_language": "en",
  "account": "Understanding Git Workflow from Working Directory, Staging, Commit, and Push\n\nGit is a powerful tool used to track changes in files and manage the development of projects, particularly those involving data. By using Git, one can record various versions of raw data, compare changes, and maintain the integrity of the original data.\n\nThe Git Workflow consists of a series of essential commands that help commit changes and track data. These commands include checking the status of the current project, making changes to the project by adding files, and committing the changes. The Git Workflow is crucial as it enables a systematic and organized approach to managing changes, keeping a record of every progress, and making it easier to identify where changes were made.\n\nIn this project, the Kenya Health Records Analysis involved working with Excel data. The project directory structure consisted of the following files and folders:\nKenya Health Records Analysis/\n- Kenya Health Records Analysis.xlsx\n- README.md\n\nTo begin working with the project, I accessed the project directory using the command `cd Kenya Health Records Analysis` and listed the contents with `ls -la`. By running `cat README.md`, I could view the contents of the file, which included the title, tools used, and challenges faced during the project.\n\nI then initialized Git on the project by running `git init`. To verify the success of this step, I checked the directory again with `ls -la` and ran `git status` to confirm the initial status of the project.\n\nNext, I made changes to the README.md file by adding more information to the \"Challenges Faced\" section. After saving the changes, I realized that simply editing a file does not automatically create a commit. To address this, I ran `git status`, which displayed the message \"Changes not staged for commit: modified: README.md\".\n\nTo stage the changes, I executed `git add README.md`, which communicated to Git that I wanted to include the changes in the next commit. This allowed me to continue working on the project without immediately pushing the changes to a remote repository.\n\nAfter staging the changes, I created a checkpoint in the project analysis by committing the changes using `git commit -m \"Kenya Health Records Analysis\"`. This command recorded the modifications made to the project, enabling me to continue working without the need to push the changes to a remote repository immediately.\n\nTo review the commit history, I used the command `git log --oneline`, which displayed a concise list of all the commits made to the project. This helped me understand the timeline of changes and revert to previous versions if necessary.\n\nFinally, when the challenges had been locally addressed, I pushed the changes to the remote repository using `git push origin main`. This action shared the local commits with the remote repository, making them accessible to others.\n\nBy understanding and following the Git Workflow, I gained essential knowledge for working with data analytics projects, such as the Kenya Health Records Analysis project. This workflow provided a solid foundation for documenting my work and building a portfolio as a Data Scientist.",
  "summary": "Git Git is used to track changes in files and allow for managing ythe developmnet of projects, especially those that entail data. I used git to enable me record the different versions of my data from the original raw data, compare changes, without interfering with the initial data. Git Workflow Git has a series of commands that are important for committing changes and tracking the data. The…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 2,
    "also_reported_by": [
      {
        "outlet": "Dev.to",
        "title": "Understanding the Git Workflow: Working Directory, Staging, Commit and Push.",
        "url": "https://urgent.news/2026/08/21/understanding-the-git-workflow-working-directory-staging-commit-and",
        "published": "2026-08-21T16:17:36.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}