Skip to content

Commit aa558f6

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/main'
2 parents f38eadf + e63609a commit aa558f6

24 files changed

+1342
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Check Existing Worktrees
2+
3+
4+
![Category: Worktree](https://img.shields.io/badge/Category-Worktree-blue)
5+
6+
#### Command
7+
```sh
8+
git worktree list
9+
```
10+
11+
#### Examples
12+
- **List all active worktrees.**
13+
14+
15+
```sh
16+
git worktree list
17+
```
18+
19+
20+
#### Steps
21+
1. List all active worktrees.
22+
23+
24+
#### Tags
25+
`worktree`, `list`
26+
27+
#### Author
28+
mike-rambil
29+
30+
#### Last Updated
31+
2024-06-10

contents/create-a-new-worktree.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Create a New Worktree
2+
3+
4+
![Category: Worktree](https://img.shields.io/badge/Category-Worktree-blue)
5+
6+
#### Command
7+
```sh
8+
git worktree add <path> <branch>
9+
```
10+
11+
#### Examples
12+
- **Create a new worktree for the feature branch.**
13+
14+
15+
```sh
16+
git worktree add ../feature-branch feature
17+
```
18+
19+
20+
#### Steps
21+
1. Create a worktree linked to a specific branch.
22+
23+
24+
#### Prerequisites
25+
- The target path must not already be a git repository.
26+
27+
28+
#### Tags
29+
`worktree`, `add`
30+
31+
#### Author
32+
mike-rambil
33+
34+
#### Last Updated
35+
2024-06-10

contents/flags-and-their-uses.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Flags and Their Uses
2+
3+
4+
#### Flags
5+
- `add`: Creates a new worktree for an existing branch.
6+
- `-b`: Creates a new worktree with a new branch.
7+
- `list`: Lists all active worktrees.
8+
- `remove`: Detaches a worktree from the repo without deleting files.
9+
- `prune`: Cleans up stale worktree references after manual deletion.
10+
- `move`: Moves a worktree to a different location.
11+
12+
13+
#### Tags
14+
`worktree`, `flags`
15+
16+
#### Author
17+
mike-rambil
18+
19+
#### Last Updated
20+
2024-06-10
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Git Clean: Remove Untracked Files and Directories
2+
3+
4+
![Category: Stashing and Cleaning](https://img.shields.io/badge/Category-Stashing%20and%20Cleaning-blue)
5+
> Remove untracked files and directories from your repository.
6+
7+
`git clean` is a powerful command that helps remove untracked files and directories from your repository. It is particularly useful when you want to reset your working directory without affecting committed files.
8+
9+
10+
#### Command
11+
```sh
12+
git clean
13+
```
14+
15+
#### Flags
16+
- `-n`: Shows what will be deleted without actually deleting anything.
17+
- `-f`: Forces deletion of untracked files.
18+
- `-d`: Deletes untracked directories.
19+
- `-i`: Interactive mode to selectively delete files.
20+
- `-x`: Removes ignored and untracked files.
21+
- `-X`: Removes only ignored files.
22+
23+
24+
#### Examples
25+
- **Preview what will be deleted (dry run).**
26+
27+
28+
```sh
29+
git clean -n -d
30+
```
31+
- **Delete all untracked files.**
32+
33+
34+
```sh
35+
git clean -f
36+
```
37+
- **Delete all untracked files and directories.**
38+
39+
40+
```sh
41+
git clean -f -d
42+
```
43+
- **Interactive mode for selective deletion.**
44+
45+
46+
```sh
47+
git clean -i
48+
```
49+
50+
51+
#### Steps
52+
1. Preview deletions: `git clean -n -d`
53+
2. Delete untracked files: `git clean -f`
54+
3. Delete untracked files and directories: `git clean -f -d`
55+
4. Interactive deletion: `git clean -i`
56+
5. Remove ignored and untracked files: `git clean -f -x`
57+
6. Remove only ignored files: `git clean -f -X`
58+
59+
60+
#### Prerequisites
61+
- Make sure you have committed all important changes.
62+
63+
64+
#### Warnings
65+
- ⚠️ This will permanently delete files! Always use `-n` before `-f`.
66+
- ⚠️ Be cautious with `-x` and `-X` as they remove ignored files, which might include config files.
67+
68+
69+
#### Links
70+
- [Official Docs](https://git-scm.com/docs/git-clean)
71+
72+
73+
#### Tags
74+
`clean`, `untracked`, `workspace`
75+
76+
#### Author
77+
mike-rambil
78+
79+
#### Last Updated
80+
2024-06-10
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# git clone --mirror <repository>
2+
3+
4+
![Category: Repository Management](https://img.shields.io/badge/Category-Repository%20Management-blue)
5+
> Clone a repository in mirror mode, including all refs and branches.
6+
7+
8+
#### Command
9+
```sh
10+
git clone --mirror https://github.com/example/repo.git
11+
```
12+
13+
#### Examples
14+
- **Create a full backup or migration of a repository.**
15+
16+
17+
```sh
18+
git clone --mirror https://github.com/example/repo.git
19+
```
20+
21+
22+
#### Steps
23+
1. Run `git clone --mirror <repository>` to create a full backup or migration.
24+
25+
26+
#### Tags
27+
`clone`, `mirror`, `backup`
28+
29+
#### Author
30+
mike-rambil
31+
32+
#### Last Updated
33+
2024-06-10
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Git Command Reference (Full List)
2+
3+
4+
![Category: Reference](https://img.shields.io/badge/Category-Reference-blue)
5+
> A comprehensive list of Git commands used in this project.
6+
7+
A comprehensive list of Git commands used in this project, formatted according to our standard.
8+
9+
10+
#### Tags
11+
`reference`, `all-commands`
12+
13+
#### Author
14+
mike-rambil
15+
16+
#### Last Updated
17+
2024-06-10
18+
19+
---
20+
21+
### Subcommands
22+
#### git init --bare
23+
Initialize a bare repository, typically used for remote repositories.
24+
25+
#### Command
26+
```sh
27+
git init --bare my-repo.git
28+
```
29+
30+
#### Examples
31+
- **Create a bare repository for collaboration.**
32+
33+
34+
```sh
35+
git init --bare my-repo.git
36+
```
37+
38+
39+
#### Steps
40+
1. Run `git init --bare my-repo.git` to create a bare repository.
41+
42+
43+
#### Tags
44+
`init`, `bare`, `repository`
45+
46+
#### Author
47+
mike-rambil
48+
49+
#### Last Updated
50+
2024-06-10
51+
52+
#### git clone --mirror <repository>
53+
Clone a repository in mirror mode, including all refs and branches.
54+
55+
#### Command
56+
```sh
57+
git clone --mirror https://github.com/example/repo.git
58+
```
59+
60+
#### Examples
61+
- **Create a full backup or migration of a repository.**
62+
63+
64+
```sh
65+
git clone --mirror https://github.com/example/repo.git
66+
```
67+
68+
69+
#### Steps
70+
1. Run `git clone --mirror <repository>` to create a full backup or migration.
71+
72+
73+
#### Tags
74+
`clone`, `mirror`, `backup`
75+
76+
#### Author
77+
mike-rambil
78+
79+
#### Last Updated
80+
2024-06-10
81+

contents/git-init-bare.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# git init --bare
2+
3+
4+
![Category: Repository Management](https://img.shields.io/badge/Category-Repository%20Management-blue)
5+
> Initialize a bare repository, typically used for remote repositories.
6+
7+
8+
#### Command
9+
```sh
10+
git init --bare my-repo.git
11+
```
12+
13+
#### Examples
14+
- **Create a bare repository for collaboration.**
15+
16+
17+
```sh
18+
git init --bare my-repo.git
19+
```
20+
21+
22+
#### Steps
23+
1. Run `git init --bare my-repo.git` to create a bare repository.
24+
25+
26+
#### Tags
27+
`init`, `bare`, `repository`
28+
29+
#### Author
30+
mike-rambil
31+
32+
#### Last Updated
33+
2024-06-10

contents/git-maintenance-start.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# git maintenance start
2+
3+
4+
![Category: Maintenance](https://img.shields.io/badge/Category-Maintenance-blue)
5+
> Runs a cronJob in background for the specified repo for periodic maintenance.
6+
7+
8+
#### Command
9+
```sh
10+
git maintenance start
11+
```
12+
13+
#### Examples
14+
- **Enable background maintenance for your repository.**
15+
16+
17+
```sh
18+
git maintenance start
19+
```
20+
21+
22+
#### Steps
23+
1. Run `git maintenance start` in your repository.
24+
25+
26+
#### Links
27+
- [Official Docs](https://git-scm.com/docs/git-maintenance)
28+
29+
30+
#### Tags
31+
`maintenance`, `automation`
32+
33+
#### Author
34+
mike-rambil
35+
36+
#### Last Updated
37+
2024-06-10
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# git replace <old-commit> <new-commit>
2+
3+
4+
![Category: History](https://img.shields.io/badge/Category-History-blue)
5+
> Temporarily substitute one commit for another.
6+
7+
8+
#### Command
9+
```sh
10+
git replace abc123 def456
11+
```
12+
13+
#### Examples
14+
- **Temporarily replace commit abc123 with def456.**
15+
16+
17+
```sh
18+
git replace abc123 def456
19+
```
20+
21+
22+
#### Steps
23+
1. Run `git replace <old-commit> <new-commit>` to test or patch history.
24+
25+
26+
#### Tags
27+
`replace`, `history`
28+
29+
#### Author
30+
mike-rambil
31+
32+
#### Last Updated
33+
2024-06-10

0 commit comments

Comments
 (0)