Q1 - Ronak-Ronu/73772127142-Devops-Assignment-1 GitHub Wiki

GIT operations using local and remote (Github) repositories


Git clone

Copying a remote repository to your local machine.

Screenshot from 2024-02-11 22-17-39


Git init

Set up a new Git repository in your project directory, allowing version control for your files

Screenshot from 2024-02-11 22-38-26


Git add

Prepare changes in your working directory to be committed to the repository.

Screenshot from 2024-02-11 22-38-54


Git commit

Save your changes to the repository along with a descriptive message.

Screenshot from 2024-02-11 22-39-30


Git branch branch-name

Command used to create a branch in a Git repository.

Screenshot from 2024-02-11 22-40-03


Git branch

Command used to list in a Git repository.

Screenshot from 2024-02-11 22-40-10


Git checkout

Switch branches or restore working tree files.

Screenshot from 2024-02-11 22-40-23


Git Stash

Temporarily storing changes without committing them.

  1. Before using Git stash

Screenshot from 2024-02-11 23-03-48

2.Using Git stash

Screenshot from 2024-02-11 23-03-57

3.Apply changes again to file using git stash apply

Screenshot from 2024-02-11 23-04-06


Pull Request

Proposing changes and requesting them to be merged into a branch on the remote repository.

  1. Creating pull request

Screenshot from 2024-02-11 23-07-13

  1. Merging pull request

Screenshot from 2024-02-11 23-07-26

  1. Merged successful to main branch.

Screenshot from 2024-02-11 23-07-34

Git push

Sending your local commits to the remote repository.

  1. Pushing from Branch-1 which creates a pull request to merge in main branch.

Screenshot from 2024-02-11 22-41-13

  1. Pushing from main branch.

Screenshot from 2024-02-11 22-42-36