diff --git a/docs/git-operations/command-line/_category_.json b/docs/git-operations/command-line/_category_.json new file mode 100644 index 0000000..38663e9 --- /dev/null +++ b/docs/git-operations/command-line/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Command-Line", + "position": 3, + "link": { + "type": "generated-index", + "description": "Guide for performing Git operations using the command-line interface." + } +} diff --git a/docs/git-operations/command-line/add-commit.md b/docs/git-operations/command-line/add-commit.md new file mode 100644 index 0000000..6b53b22 --- /dev/null +++ b/docs/git-operations/command-line/add-commit.md @@ -0,0 +1,48 @@ +--- +sidebar_position: 2 +title: "Add & Commit Changes" +--- + +# Add & Commit Changes + +--- + +# Add Changes + +## Objective + +Select modified files and place them into the staging area before committing. + +## Steps + +1. Modify one or more files in the project. +2. In the terminal, check the status of the repository: `git status` + +![Git Status](img/2.png) + +3. Add files to the staging area: `git add .` + +![Git Add](img/3.png) + +4. Verify that files are staged: `git status` + +![Git Status Staged](img/4.png) + +--- + +# Commit Changes + +## Objective + +Save local changes to the local Git repository. + +## Steps + +1. Ensure files are staged. +2. Enter the commit command with a message: `git commit -m "Your commit message"` + +![Git Commit](img/5.png) + +3. Verify the commit: `git log --oneline` + +![Git Log](img/6.png) diff --git a/docs/git-operations/command-line/img/1.png b/docs/git-operations/command-line/img/1.png new file mode 100644 index 0000000..583ea4d Binary files /dev/null and b/docs/git-operations/command-line/img/1.png differ diff --git a/docs/git-operations/command-line/img/2.png b/docs/git-operations/command-line/img/2.png new file mode 100644 index 0000000..e79f5eb Binary files /dev/null and b/docs/git-operations/command-line/img/2.png differ diff --git a/docs/git-operations/command-line/img/3.png b/docs/git-operations/command-line/img/3.png new file mode 100644 index 0000000..faf0e8e Binary files /dev/null and b/docs/git-operations/command-line/img/3.png differ diff --git a/docs/git-operations/command-line/img/4.png b/docs/git-operations/command-line/img/4.png new file mode 100644 index 0000000..5fa7624 Binary files /dev/null and b/docs/git-operations/command-line/img/4.png differ diff --git a/docs/git-operations/command-line/img/5.png b/docs/git-operations/command-line/img/5.png new file mode 100644 index 0000000..9f4df5a Binary files /dev/null and b/docs/git-operations/command-line/img/5.png differ diff --git a/docs/git-operations/command-line/img/6.png b/docs/git-operations/command-line/img/6.png new file mode 100644 index 0000000..9199682 Binary files /dev/null and b/docs/git-operations/command-line/img/6.png differ diff --git a/docs/git-operations/command-line/img/7.png b/docs/git-operations/command-line/img/7.png new file mode 100644 index 0000000..04c430d Binary files /dev/null and b/docs/git-operations/command-line/img/7.png differ diff --git a/docs/git-operations/command-line/img/8.png b/docs/git-operations/command-line/img/8.png new file mode 100644 index 0000000..7a80ae1 Binary files /dev/null and b/docs/git-operations/command-line/img/8.png differ diff --git a/docs/git-operations/command-line/index.md b/docs/git-operations/command-line/index.md new file mode 100644 index 0000000..45e997c --- /dev/null +++ b/docs/git-operations/command-line/index.md @@ -0,0 +1,16 @@ +--- +sidebar_position: 1 +title: "Prerequisites" +--- + +# Prerequisites + +--- + +## Steps + +1. Install Git on the system. +2. Open a terminal or command prompt. +3. Navigate to the project directory that is already connected to a Git repository. + +![Terminal Window](img/1.png) diff --git a/docs/git-operations/command-line/push-pull.md b/docs/git-operations/command-line/push-pull.md new file mode 100644 index 0000000..93323e2 --- /dev/null +++ b/docs/git-operations/command-line/push-pull.md @@ -0,0 +1,37 @@ +--- +sidebar_position: 3 +title: "Push & Pull Changes" +--- + +# Push & Pull Changes + +--- + +# Push Changes + +## Objective + +Send committed changes from the local repository to the remote repository. + +## Steps + +1. Ensure at least one commit exists locally. +2. Execute the push command: `git push` + +![Git Push](img/7.png) + +--- + +# Pull Changes + +## Objective + +Retrieve updates from the remote repository and merge them into the local repository. + +## Steps + +1. Execute the pull command: `git pull` + +![Git Pull](img/8.png) + +2. Review the output for updates or merge results.