Tools: Understanding version control:How Git and GitHub play a vital role.

Tools: Understanding version control:How Git and GitHub play a vital role.

Source: Dev.to

Version control ## Setting up git ## Initialising Git ## Adding files to be tracked ## Pushing code to Git Hub ## Commands to push code ## Pulling code This is a system that enables tracking changes made to files over time.It enables collaboration between people working on same projects without interfering with each other's work.Git and GitHub are essential tools in version control. Git A version control system used to track changes made on files and also allows collaboration of teams dealing with same projects by recording every change made. Git Bash It allows Windows users to fully utilise Git by acting as a command line. GitHub An online platform that works with Git to manage and share code.It allows for many people to work on the same project without conflicts. It acts as a backup for projects being done and allows sharing projects with others. On Windows Git Bash is used as a command line for Git.The following commands are used to configure your user name and email. git config --global user.name"name" git config --global user.email"email address" The process of creating a folder and adding it to Git Action Command Create folder mkdir folder_name Enter folder cd folder_name Go back cd .. Create file touch file.txt Check location pwd Check git status git status Add to git git add folder_name Commit git commit -m "message" Once you create a project folder initialise Git using this command git init Use this command git add filename This is the process of uploading changes made on your projects from your computer to an online platform including GitHub and Git Lab.It is important because it enables you to share your work with your teammates,it updates the project repository with the latest changes and also keeps a backup of your work online. git add filename git add . git commit -m "a description of what you changed" git remote add origin [email protected]:username/repo-name.git push your changes to GitHub git push -u origin main This is the process of downloading latest changes made on your project from an online repository to you computer(local). Done using this command Conclusion Understanding version control system is very important for data scientists and analysts.Git and GitHub enable data analysts to effectively manage their projects and share their work with others. Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse - Add files to staging area This is choosing what changes of your code or project you want saved.It is done using this command - Committing your changes This involves saving a clear snapshot of your project for easy collaboration,tracking progress and avoiding mistakes.The following command is used - Pushing changes to a remote repository Involves sending changes saved(commits)from your computer to a remote repository (GitHub).Done using this command