0% found this document useful (0 votes)
6 views2 pages

Experiment 4

Exp

Uploaded by

Venkat Marturi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Experiment 4

Exp

Uploaded by

Venkat Marturi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Module: Implementation of CICD with Java and Open-Source Stack

Aim:

To configure version control for a web application using Git commands and operations, and to
integrate the repository with GitHub for collaborative development and version management.

Steps in Simple Format

Step 1: Install Git

1. Go to the official Git website.

2. Download Git for your operating system (Windows, macOS, Linux/Unix).

3. Follow the installation instructions to complete the setup.

Step 2: Configure Git

1. Open a terminal or command prompt.

2. Configure your Git username:

3. git config --global user.name "Your Name"

4. Configure your Git email:

5. git config --global user.email "[email protected]"

6. Optionally, set the default branch name:

7. git config --global init.defaultBranch main

Step 3: Set Up a GitHub Account

1. Visit GitHub and click Sign Up.

2. Enter your email, username, and password, then verify your account.

3. After signing up, log in to your account.

Step 4: Create a New GitHub Repository

1. Click New Repository on your GitHub dashboard.

2. Provide a repository name and description.

3. Choose Public or Private visibility.

4. Click Create Repository.

Step 5: Create a Local File

1. Open your computer's file system and create a folder (e.g., MyProject).

2. Inside the folder, create a file (e.g., example.txt). Add some text to the file.

Step 6: Initialize Git in Your Local Folder


1. Open a terminal or command prompt in the folder where your file is located.

2. Initialize a Git repository:

3. git init

Step 7: Add Files to the Repository

1. Stage your file for commit:

2. git add example.txt

3. Check the status to confirm:

4. git status

Step 8: Commit Changes

• Save your changes with a commit message:

• git commit -m "Initial commit"

Step 9: Link Your Local Repository to GitHub

1. Copy the HTTPS URL of your GitHub repository (from the GitHub page).

2. Add the remote repository to your local Git repository:

3. git remote add origin <repository-url>

Replace <repository-url> with the copied URL.

Step 10: Push Changes to GitHub

1. Push your local changes to the GitHub repository:

2. git push -u origin main

Expected Output:

1. File Uploaded: The file (example.txt) will appear in your GitHub repository.

2. GitHub Repository Status: The repository will display the committed changes along
with the message ("Initial commit").

3. Git Logs: Use the following command to check the commit history:

4. git log

This simple format ensures easy setup and integration of Git with GitHub for version control.

You might also like