se agrega .md de tailscale para hacer gitea https
This commit is contained in:
1 parent
f915802fb4
commit
920a4a2d56
10 files changed
+2081
-2066
No files matched your search
@@ -1,17 +1,30 @@
|
||||
# 🚀 Subir proyecto local a Gitea (Mac + Tailscale)
|
||||
|
||||
## 1. Crear `.gitignore`
|
||||
> Guía ordenada por **flujo normal de trabajo**. Si algo falla, sigue las marcas ⚠️ que apuntan a su resolución al final del documento.
|
||||
|
||||
---
|
||||
|
||||
## PARTE A — FLUJO NORMAL (paso a paso)
|
||||
|
||||
### 1. Crear repositorio en Gitea
|
||||
- Nombre: `descarga_adjuntos_correos_cpe`
|
||||
- Sin README
|
||||
- Sin opciones automáticas
|
||||
|
||||
> Guarda la URL del repositorio para usarla después.
|
||||
|
||||
### 2. Crear `.gitignore`
|
||||
```bash
|
||||
cd /Users/george/descarga_adjuntos_correos_cpe
|
||||
touch .gitignore
|
||||
```
|
||||
|
||||
## 2. Editar `.gitignore`
|
||||
### 3. Editar `.gitignore`
|
||||
```bash
|
||||
nano .gitignore
|
||||
```
|
||||
|
||||
### Contenido recomendado
|
||||
#### Contenido recomendado
|
||||
```bash
|
||||
__pycache__/
|
||||
*.pyc
|
||||
@@ -23,100 +36,131 @@ secrets.yaml
|
||||
.idea/
|
||||
```
|
||||
|
||||
## 3. Si ya hiciste `git add` antes del `.gitignore`
|
||||
```bash
|
||||
git rm -r --cached .
|
||||
git add .
|
||||
git commit -m "aplicar gitignore correctamente"
|
||||
```
|
||||
> ⚠️ ¿Ya habías hecho `git add` antes de crear el `.gitignore`? → [[#Resolución: archivos que debían ignorarse siguen apareciendo]]
|
||||
|
||||
## 4. Inicializar repositorio Git
|
||||
### 4. Inicializar repositorio Git
|
||||
```bash
|
||||
cd /Users/george/descarga_adjuntos_correos_cpe
|
||||
git init
|
||||
```
|
||||
|
||||
## 5. Agregar archivos
|
||||
### 5. Agregar archivos
|
||||
```bash
|
||||
git add .
|
||||
```
|
||||
|
||||
## 6. Primer commit
|
||||
> ⚠️ ¿Agregaste errores o archivos incorrectos? → [[#Resolución: quitar archivos del staging (deshacer git add)]]
|
||||
|
||||
### 6. Primer commit
|
||||
```bash
|
||||
git commit -m "primer commit"
|
||||
```
|
||||
|
||||
## 6.1 Commit de un proyecto dentro de una Solución
|
||||
> ⚠️ ¿El commit quedó mal y aún no hice push? → [[#Resolución: deshacer un commit antes de subirlo]]
|
||||
|
||||
### 7. Conectar repo local con Gitea
|
||||
```bash
|
||||
git remote add origin http://100.68.242.27:30000/george/descarga_adjuntos_correos_cpe.git
|
||||
```
|
||||
|
||||
> ⚠️ ¿El remote ya existe o está mal configurado? → [[#Resolución: problemas con el remote]]
|
||||
|
||||
### 8. Subir código por primera vez
|
||||
```bash
|
||||
git branch -M main
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
> ⚠️ ¿El push falla por conexión o autenticación? → [[#Resolución: no puedo subir (push)]]
|
||||
|
||||
---
|
||||
|
||||
## PARTE B — VARIANTES DE COMMIT
|
||||
|
||||
Estos pasos van **después** del commit básico según lo que necesites.
|
||||
|
||||
### Commit de un proyecto dentro de una Solución
|
||||
```bash
|
||||
git add ProyectoA/
|
||||
git status
|
||||
git commit -m "mensaje commit para los archivos modificados del proyecto"
|
||||
```
|
||||
|
||||
## 6.2 Commit de un archivo específico dentro de un proyecto
|
||||
### Commit de un archivo específico dentro de un proyecto
|
||||
```bash
|
||||
git add ProyectoA/FacturaNegociable.cs
|
||||
git status
|
||||
git commit -m "mensaje commit para el archivo especifico del proyecto"
|
||||
```
|
||||
|
||||
## 6. 3 Git reset , quita todos los archivos del staging area que coloco git add, reversa el git add antes del git commit
|
||||
```bash
|
||||
git reset
|
||||
```
|
||||
---
|
||||
|
||||
## 6. 4 Git reset , si ya hice commit, pero aún no hice push
|
||||
```bash
|
||||
git reset --soft HEAD~1
|
||||
git reset
|
||||
```
|
||||
## PARTE C — FLUJO DIARIO
|
||||
|
||||
## 7. Crear repositorio en Gitea
|
||||
- Nombre: descarga_adjuntos_correos_cpe
|
||||
- Sin README
|
||||
- Sin opciones automáticas
|
||||
|
||||
## 8. URL del repositorio
|
||||
```bash
|
||||
http://100.68.242.27:30000/george/descarga_adjuntos_correos_cpe.git
|
||||
```
|
||||
|
||||
## 9. Conectar repo local con Gitea
|
||||
```bash
|
||||
git remote add origin http://100.68.242.27:30000/george/descarga_adjuntos_correos_cpe.git
|
||||
```
|
||||
|
||||
## 10. Subir código por primera vez
|
||||
```bash
|
||||
git branch -M main
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
## 11. Cambiar URL del repositorio
|
||||
```bash
|
||||
git remote set-url origin http://100.x.x.x:3000/george/descarga_adjuntos_correos_cpe.git
|
||||
git remote -v
|
||||
```
|
||||
|
||||
## 12. Eliminar y volver a configurar remote
|
||||
```bash
|
||||
git remote remove origin
|
||||
git remote add origin http://100.68.242.27:3000/george/descarga_adjuntos_correos_cpe.git
|
||||
```
|
||||
|
||||
## 13. Validar conexión
|
||||
```bash
|
||||
curl http://100.68.242.27:30000
|
||||
```
|
||||
|
||||
## 14. Acceso a Gitea
|
||||
|
||||
[URL de Gitea en NAS](http://100.68.242.27:30000)
|
||||
|
||||
|
||||
## 15. Flujo diario
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "mensaje claro"
|
||||
git push
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## PARTE D — CLONAR / REUTILIZAR
|
||||
|
||||
### Clonar repositorio
|
||||
```bash
|
||||
git clone http://100.68.242.27:3000/george/descarga_adjuntos_correos_cpe.git
|
||||
```
|
||||
|
||||
### Validar conexión con Gitea
|
||||
```bash
|
||||
curl http://100.68.242.27:30000
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## PARTE E — ACCESO
|
||||
|
||||
- [URL de Gitea en NAS](http://100.68.242.27:30000)
|
||||
|
||||
---
|
||||
|
||||
# 🔧 RESOLUCIÓN DE PROBLEMAS
|
||||
|
||||
## Resolución: archivos que debían ignorarse siguen apareciendo
|
||||
Si ya hiciste `git add` antes del `.gitignore`, quitalos del índice:
|
||||
```bash
|
||||
git rm -r --cached .
|
||||
git add .
|
||||
git commit -m "aplicar gitignore correctamente"
|
||||
```
|
||||
|
||||
## Resolución: quitar archivos del staging (deshacer git add)
|
||||
Si agregaste archivos que no deberían ir, reversa el `git add` **antes** de commitear:
|
||||
```bash
|
||||
git reset
|
||||
```
|
||||
|
||||
## Resolución: deshacer un commit antes de subirlo
|
||||
Si ya hiciste commit pero **aún no** hiciste push:
|
||||
```bash
|
||||
git reset --soft HEAD~1
|
||||
git reset
|
||||
```
|
||||
|
||||
## Resolución: no puedo subir (push)
|
||||
- Verifica la conexión con el NAS: `curl http://100.68.242.27:30000`
|
||||
- Revisa si el remote está bien configurado: `git remote -v`
|
||||
|
||||
## Resolución: problemas con el remote (URL incorrecta o antigua)
|
||||
### Cambiar la URL del repositorio
|
||||
```bash
|
||||
git remote set-url origin http://100.x.x.x:3000/george/descarga_adjuntos_correos_cpe.git
|
||||
git remote -v
|
||||
```
|
||||
|
||||
### Eliminar y volver a configurar el remote
|
||||
```bash
|
||||
git remote remove origin
|
||||
git remote add origin http://100.68.242.27:3000/george/descarga_adjuntos_correos_cpe.git
|
||||
```
|
||||
Reference in new issue
Block a user