add git-operations-in-the-command-line
All checks were successful
Deploy triz-docs to civital server / build-and-deploy (push) Successful in 1h8m30s
8
docs/git-operations/command-line/_category_.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"label": "Command-Line",
|
||||
"position": 3,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Guide for performing Git operations using the command-line interface."
|
||||
}
|
||||
}
|
||||
48
docs/git-operations/command-line/add-commit.md
Normal file
@ -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`
|
||||
|
||||

|
||||
|
||||
3. Add files to the staging area: `git add .`
|
||||
|
||||

|
||||
|
||||
4. Verify that files are staged: `git status`
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
# 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"`
|
||||
|
||||

|
||||
|
||||
3. Verify the commit: `git log --oneline`
|
||||
|
||||

|
||||
BIN
docs/git-operations/command-line/img/1.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
docs/git-operations/command-line/img/2.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
docs/git-operations/command-line/img/3.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
docs/git-operations/command-line/img/4.png
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
docs/git-operations/command-line/img/5.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
docs/git-operations/command-line/img/6.png
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
docs/git-operations/command-line/img/7.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
docs/git-operations/command-line/img/8.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
16
docs/git-operations/command-line/index.md
Normal file
@ -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.
|
||||
|
||||

|
||||
37
docs/git-operations/command-line/push-pull.md
Normal file
@ -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`
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
# Pull Changes
|
||||
|
||||
## Objective
|
||||
|
||||
Retrieve updates from the remote repository and merge them into the local repository.
|
||||
|
||||
## Steps
|
||||
|
||||
1. Execute the pull command: `git pull`
|
||||
|
||||

|
||||
|
||||
2. Review the output for updates or merge results.
|
||||