update(order)

This commit is contained in:
tuz 2025-10-16 23:31:23 -05:00
commit 7bd1ff1774
14 changed files with 201 additions and 0 deletions

67
README.md Normal file
View File

@ -0,0 +1,67 @@
# Git Config
## Git
### Install && Config
```sh
sudo apt update
sudo apt install git
```
```sh
sudo adduser \
--system \
--shell /bin/bash \
--gecos "Git Version Control" \
--group \
--disabled-password \
--home /home/git \
git
```
## SSH
### Install && Config
#### Linux
install
```sh
sudo apt update
sudo apt install git
sudo apt install openssh-client
```
config
```sh
ssh-keygen -t ed25519 -C "name@ssh.local"
```
copy and paste
```sh
cat ~/.ssh/id_ed25519.pub
```
copy to server
```sh
ssh-copy-id -p 22 root@<ip>
```
## Error`s
### SSH key
```
Cloning into '<repo>'...
repo@repo.local: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
```
cat ~/.ssh/id_ed25519.pub
```

9
lang/.gitattributes.md Normal file
View File

@ -0,0 +1,9 @@
# .gitattributes
`.gitattributes`
```text
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
```

20
lang/branch.md Normal file
View File

@ -0,0 +1,20 @@
# Branch
## Create
```sh
git branch
git branch new_branch
```
## Switch
```sh
git switch main
git checkout main
```
#### Create and switch
```sh
git switch -c main
git checkout -b main
```

8
lang/clone.md Normal file
View File

@ -0,0 +1,8 @@
# Clone
## SSH
```sh
git clone ssh://
```

21
lang/config.md Normal file
View File

@ -0,0 +1,21 @@
# Config
## Windows
```sh
git config --global core.autocrlf input
git config --global core.eol lf
```
## Username && Mail
```sh
git config --global user.email "tuz@mail.local"
git config --global user.name "tuz"
git config --global user.name "unknown"
git config --global user.email "unknown@mail.local"
git config --global user.email "name@mail.local"
git config --global user.name "name"
```

3
lang/delete.md Normal file
View File

@ -0,0 +1,3 @@
// Delete local branch
git branch -d main
git branch -D main

38
lang/git-lfs.md Normal file
View File

@ -0,0 +1,38 @@
# git-lfs
## Install
sudo apt install git-lfs
git lfs Install
## GIT track file types
```
git lfs track "*.png"
git lfs track "*.jpg"
git lfs track "*.mp4"
git lfs track "*.zip"
```
## Commit Config LFS
```
git add .gitattributes
git commit -m "Enable Git LFS"
```
# Track images
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
# Track video
*.mp4 filter=lfs diff=lfs merge=lfs -text
# Track design files
*.psd filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text

4
lang/makefile Normal file
View File

@ -0,0 +1,4 @@
all:
git add -A
git commit -m "Update"
git push -u origin main

7
lang/owner.md Normal file
View File

@ -0,0 +1,7 @@
git config --global --add safe.directory "C:/Users/user/source/repo"
git config --global --add safe.directory "C:/Users/user/*"
git status

0
lang/push.md Normal file
View File

7
lang/remote.md Normal file
View File

@ -0,0 +1,7 @@
# Remote
```sh
git remote -v
git remote set-url origin
git remote set-url origin ssh://git@gitea.com:<port>/[user]/git.git
```

3
lang/show.md Normal file
View File

@ -0,0 +1,3 @@
# Show
git branch -a

8
lang/ssh.md Normal file
View File

@ -0,0 +1,8 @@
# SSH
```sh
cat ~/.ssh/id_ed25519.pub
```

6
lang/status.md Normal file
View File

@ -0,0 +1,6 @@
# Status
```sh
git status
```