Working directory
A working directory is where you you actually work on your project. It contains all the files you've made plus changes you'd made.
For example, if you add an sql (https://en.wikipedia.org/wiki/SQL) file and add changes on your vscode (which is your integrated development environment for coding), it will reflect in your working directory.
Staging area
The staging area acts like a preparation area where you organize the changes that will be included in your next commit.
So these changes are done using the command:
git add
Commit
This is ideally what should happen after staging - adding changes and all.
A commit is like taking a snapshot of your project at a specific point in time. The commit message helps describe what changes were made and is super useful for documentation purposes. To commit changes, we use the command
git commit -m ''
Push
Pushing refers very simply to uploading or posting up your work. In github, we push our commits to repositories using the command:
git push
This shows your project online and allows for collaborations with other developers.
Conclusion
Understanding the workflow makes it easier to track changes in case of any errors found later, manage your projects, and collaborate with others.
For me, as a beginner learning data analytics, Git is an interesting and useful tool for keeping track of projects, scripts, and datasets as I continue building my skills. I'm excited to learn more about it and how to collaborate on future projects as we go along!
Top comments (0)