Pie Logo
Submissions
by Tomas Trescak

PresentationInteractive, narrated presentation of the section content.

ContentDetailed description of the section content.

Submitting the assignment means to "commit" and  “push” your changes to the repository on github. 

In Git, the terms "committing" and "pushing" refer to two distinct stages in managing and sharing changes within a repository. Understanding the difference between these two actions is crucial for effective version control and collaboration in Git.

Git Workflow

Committing Files

Committing is the process of saving your changes to the local repository. When you make changes to files, Git tracks these modifications. To commit is to record the current state of the files in your local Git database. This action creates a "commit," which is like a snapshot of your repository at a specific moment in time. Each commit is accompanied by a commit message, which is a brief description of what changes were made and why. This allows you and others to understand the history of changes when reviewing the project's development.

Benefits of Committing:

  • History and Rollback: Each commit has a unique ID, allowing you to keep a detailed history of changes. If a mistake is made, you can easily revert to previous versions.

  • Incremental Changes: Committing frequently keeps your work incremental, making it easier to isolate and fix bugs.

  • Documentation: Commit messages serve as documentation for the changes made, which is helpful for both current collaborators and future maintainers.

Pushing Files

Pushing refers to the act of sending your committed changes from your local repository to a remote repository. This remote repository is typically hosted on a server or a service like GitHub, GitLab, or Bitbucket. Pushing makes your changes available to others and often follows several local commits that collectively make up a complete piece of work or a fix.

Benefits of Pushing:

  • Collaboration: Pushing changes to a remote repository shares your work with team members. Others can pull your changes from the remote to their local environments to continue collaborative work.

  • Backup: By pushing to a remote repository, you create a backup of your work that is stored independently from your local machine. This protects your work against local hardware failures.

  • Continuous Integration: In environments with continuous integration/continuous deployment (CI/CD), pushing changes can trigger automated tests and deployment processes, helping to maintain code quality and streamline the deployment process.

The primary difference between committing and pushing in Git is the scope of action. Committing is local, affecting only your repository and allowing you to save and document your changes without affecting others. Pushing is a network action that updates the remote repository and is essential for collaborative projects. Together, these actions form the backbone of Git's distributed version control capabilities, allowing for robust management of project changes across different environments and teams.

Submitting in Visual Studio Code and Codespaces

To commit your files, open the Source Control menu by clicking on the button in your left menu. It should have a little number “1” next to it, showing you the list of the changes that you made:

Source Control

Please fill out your commit message and click on the big “Commit” button. The files should now disappear. Once that is done,  you can either click the “Sync Changes” button that replaced the “Commit” button or please click on the “…” menu and select “Push”

Pushing Code

There is also a sync button at the bottom of your editor that you can use to push and pull changes from the repository

Sync

 

Discuss with OthersAsk questions, share your thoughts, and discuss with other learners.

Loading discussion ...
Full Stack Development
Introduction
Generative AI
🍰 Player
💼 Editor
Setup
Software Installation
Project Setup
Running and Testing
React and ReactDOM
Assignment 1.1: Welcome Message
Submissions
React Fundamentals
Next.js
Advanced React
Databases
React Hooks
Authentication and Authorisation
APIs
CI/CD and DevOps
Testing React
Advanced Topics
    Pie Logo
    Submissions
    by Tomas Trescak

    PresentationInteractive, narrated presentation of the section content.

    ContentDetailed description of the section content.

    Submitting the assignment means to "commit" and  “push” your changes to the repository on github. 

    In Git, the terms "committing" and "pushing" refer to two distinct stages in managing and sharing changes within a repository. Understanding the difference between these two actions is crucial for effective version control and collaboration in Git.

    Git Workflow

    Committing Files

    Committing is the process of saving your changes to the local repository. When you make changes to files, Git tracks these modifications. To commit is to record the current state of the files in your local Git database. This action creates a "commit," which is like a snapshot of your repository at a specific moment in time. Each commit is accompanied by a commit message, which is a brief description of what changes were made and why. This allows you and others to understand the history of changes when reviewing the project's development.

    Benefits of Committing:

    • History and Rollback: Each commit has a unique ID, allowing you to keep a detailed history of changes. If a mistake is made, you can easily revert to previous versions.

    • Incremental Changes: Committing frequently keeps your work incremental, making it easier to isolate and fix bugs.

    • Documentation: Commit messages serve as documentation for the changes made, which is helpful for both current collaborators and future maintainers.

    Pushing Files

    Pushing refers to the act of sending your committed changes from your local repository to a remote repository. This remote repository is typically hosted on a server or a service like GitHub, GitLab, or Bitbucket. Pushing makes your changes available to others and often follows several local commits that collectively make up a complete piece of work or a fix.

    Benefits of Pushing:

    • Collaboration: Pushing changes to a remote repository shares your work with team members. Others can pull your changes from the remote to their local environments to continue collaborative work.

    • Backup: By pushing to a remote repository, you create a backup of your work that is stored independently from your local machine. This protects your work against local hardware failures.

    • Continuous Integration: In environments with continuous integration/continuous deployment (CI/CD), pushing changes can trigger automated tests and deployment processes, helping to maintain code quality and streamline the deployment process.

    The primary difference between committing and pushing in Git is the scope of action. Committing is local, affecting only your repository and allowing you to save and document your changes without affecting others. Pushing is a network action that updates the remote repository and is essential for collaborative projects. Together, these actions form the backbone of Git's distributed version control capabilities, allowing for robust management of project changes across different environments and teams.

    Submitting in Visual Studio Code and Codespaces

    To commit your files, open the Source Control menu by clicking on the button in your left menu. It should have a little number “1” next to it, showing you the list of the changes that you made:

    Source Control

    Please fill out your commit message and click on the big “Commit” button. The files should now disappear. Once that is done,  you can either click the “Sync Changes” button that replaced the “Commit” button or please click on the “…” menu and select “Push”

    Pushing Code

    There is also a sync button at the bottom of your editor that you can use to push and pull changes from the repository

    Sync

     

    Discuss with OthersAsk questions, share your thoughts, and discuss with other learners.

    Loading discussion ...
    Full Stack Development
    Introduction
    Generative AI
    🍰 Player
    💼 Editor
    Setup
    Software Installation
    Project Setup
    Running and Testing
    React and ReactDOM
    Assignment 1.1: Welcome Message
    Submissions
    React Fundamentals
    Next.js
    Advanced React
    Databases
    React Hooks
    Authentication and Authorisation
    APIs
    CI/CD and DevOps
    Testing React
    Advanced Topics

    No hints available.

    No hints available.

    Pie Logo
    Submissions
    by Tomas Trescak
    Pie Logo
    Submissions
    by Tomas Trescak
    Full Stack Development
    Introduction
    Generative AI
    🍰 Player
    💼 Editor
    Setup
    Software Installation
    Project Setup
    Running and Testing
    React and ReactDOM
    Assignment 1.1: Welcome Message
    Submissions
    React Fundamentals
    Next.js
    Advanced React
    Databases
    React Hooks
    Authentication and Authorisation
    APIs
    CI/CD and DevOps
    Testing React
    Advanced Topics
    Full Stack Development
    Introduction
    Generative AI
    🍰 Player
    💼 Editor
    Setup
    Software Installation
    Project Setup
    Running and Testing
    React and ReactDOM
    Assignment 1.1: Welcome Message
    Submissions
    React Fundamentals
    Next.js
    Advanced React
    Databases
    React Hooks
    Authentication and Authorisation
    APIs
    CI/CD and DevOps
    Testing React
    Advanced Topics