Urgent.News

What's breaking now, across thousands of outlets.

Tech

Understanding Git Workflow from Working Directory, Staging, Commit, and Push.

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…

Understanding Git Workflow from Working Directory, Staging, Commit, and Push

Git 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.

The 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.

In this project, the Kenya Health Records Analysis involved working with Excel data. The project directory structure consisted of the following files and folders:

Kenya Health Records Analysis/

- Kenya Health Records Analysis.xlsx

- README.md

To 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.

I 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.

Next, 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".

To 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.

After 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.

To 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.

Finally, 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.

By 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.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to →

More in Tech

How I Built a Zero-Knowledge 2FA Authenticator Using Rust, Tauri, and React

Are you tired of being locked out of your accounts when you reset your phone? I was. I wanted a 2FA authenticator that would sync my codes seamlessly across devices, but I didn't want to hand over my…

  • OtpVault offers zero-knowledge 2FA authenticator solution
  • Rust backend uses cryptography libraries like aes-gcm, argon2, and totp-rs
  • React 19, Vite, and Tailwind CSS power frontend development

Declarative WebGPU with S-expressions

  • pngine is a declarative format and runtime for WebGPU developed over 2.5 years
  • S-expressions are compiled into binary representation and interpreted by runtime
  • pngine aims to create single file describing all aspects of WebGPU pipelines

More from Sunday 23 August →