DEV Community

Cover image for The importance of pushing your codes to github always
OLUKINNI
OLUKINNI

Posted on

The importance of pushing your codes to github always

Before we dive into the importance of pushing our codes to GitHub as soon as possible, I would like to inform you all about git and what GitHub is...

Git

Git is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for a distributed, non-linear workflow.

GitHub

GitHub is a cloud-based hosting service that lets you manage Git repositories. So majorly GitHub is a cloud-storage system where we save our codes for future use.
To learn more about GitHub click.
These two are majorly important to be known to a newbie, a right attitude towards building your career as a programmer is to always push your code to GitHub.

Some reasons for pushing your code

  1. Backup and version control: By pushing your code to GitHub, you create a backup of your work in case of data loss on your local machine. Additionally, GitHub serves as a version control system, allowing you to track changes to your code over time and easily revert to a previous version if needed.

  2. Collaboration: If you're working on a project with others, pushing your code to GitHub allows your team members to see and review your changes, collaborate on code together, and catch errors or issues early on.

  3. Showcase your work: GitHub is popular platform developers and employers use to showcase their work. By pushing your code to GitHub, you create a public portfolio of your work that can be viewed and shared with others.

  4. Continuous integration and deployment: By pushing your code to GitHub, you can integrate it with various continuous integration and deployment (CI/CD) tools that automate testing, building, and deployment processes. This can help ensure that your code is always in a functional state and ready for deployment.

You push to GitHub by going through the following steps

    git init
    git add .
    git commit -m "commit message"
    git remote add origin 'your_url_name'
    git push -u origin master
Enter fullscreen mode Exit fullscreen mode

Conculsion

Pushing your code to GitHub regularly means uploading your code to a website called GitHub where it's stored safely, which is a good practice. This is important because it's like having a backup copy of your code in case your computer crashes or something goes wrong, also helps you and your team collaborate more effectively, keep track of changes, and showcase your work.

Open for review and contribution!
Thank you.

Top comments (0)