On Local when any Change...
git add -> git commit -> git push origin main

On Server...
git pull origin main

The overall process

People often call this:

Git-based deployment

Deploy via git pull

Or simply: push to GitHub, pull on server

---
on local

# 1. Stage everything you changed
git add .

# 2. Commit with a message
git commit -m "Use MariaDB for TODO storage"

# 3. Push to GitHub
git push origin main

on server

login as owner of the site then
su - cloud # or ssh in as cloud
go version # should also show go1.22.0

cd ~/public_html
git pull
go build -o todo-app

login to root
su

sudo systemctl restart todo-app
sudo systemctl status todo-app

#git #command #common #github
You can totally do that 👍
Think of it like this:

1. Your backup folder = the code you want
2. Your Git repo = the thing connected to GitHub
3. You copy backup → repo, commit, then (maybe) force-push to make GitHub match.

I’ll assume:

* Your WSL project repo is: ~/projects/go/todo-api
* Your backup is somewhere like: ~/backup/todo-api-backup

---

## A. Make your local repo match the backup

1. Go to your repo:


   cd ~/projects/go/todo-api


2. (Optional, but safer) Clean out current files except .git:


   rm -rf *
rm -rf .[^.]* 2>/dev/null # removes dotfiles but keeps .git if it exists


> If rm -rf .[^.]* scares you, skip it and just overwrite files when copying.

3. Copy the backup contents into this repo:


   cp -r ~/backup/todo-api-backup/* .
cp -r ~/backup/todo-api-backup/.* . 2>/dev/null || true


> If your backup also has a .git folder, this will overwrite your current .git.
> That’s fine as long as its origin is still set to https://github.com/kenzastore/todo-api.git.
> We’ll check that next.

4. Check git status and remote:


   git status
git remote -v


You should see:

* lots of changes (or “untracked files”)
* origin https://github.com/kenzastore/todo-api.git

If there is no .git (i.e. git status says “not a git repository”), then:


   git init
git branch -M main
git remote add origin https://github.com/kenzastore/todo-api.git


---

## B. Commit the backup as the new version

git add .
git commit -m "Restore original Go app from backup"


Now your local main branch = backup code.

---

## C. Decide: overwrite GitHub or merge?

### 1️⃣ If you want GitHub to match the backup (overwrite)

This will throw away newer commits on GitHub and replace them with your backup.

git push -f origin main


* -f = force (required because history is different)
* After this, GitHub’s main will look exactly like your local code.

### 2️⃣ If you want to keep GitHub history and merge backup in

Then instead of forcing, you’d first pull and rebase:

git pull --rebase origin main
# resolve any conflicts
git push origin main


But from how you described it (“backup of the original go folder”), you probably want option 1: force-push so everything goes back to that state.

---

## D. Update the server from GitHub

Once GitHub has the backup version:

On the server as user cloud:

cd ~/public_html
git fetch origin
git reset --hard origin/main # make server code exactly match GitHub
go build -o todo-app


Then as root:

systemctl restart todo-app
systemctl status todo-app


Now:

* WSL code = backup
* GitHub = backup
* Server = backup build, running on your domain

---
#git #command #common #github #backup #upload #change #file #wsl #server
https://github.com/dhanji/g3

#g3 #dhanji #new #ai
paper of dialectical autocoding


In this video, I'll be telling you about g3, a revolutionary new AI coding tool based on adversarial cooperation that solves the context loss problem by making two AI agents fight each other to write better code. This is based on a groundbreaking research paper and represents a completely new paradigm for autonomous software development.

--
Key Takeaways:

🤖 Current AI coding tools like Cursor and Windsurf struggle with complex projects due to context loss and hallucinations.
⚔️ g3 uses two adversarial agents - the Player (builder) and the Coach (critic) - that argue to produce better code.
🧠 Fresh context windows every turn prevent the AI from getting confused by past mistakes and bad attempts.
In testing, g3 achieved 100% requirement compliance and zero crashes while other tools failed or needed manual intervention.
⏱️ Takes about 3 hours to run autonomously but delivers 1,800+ lines of fully functional, tested code without human input.
💰 Higher token costs due to multiple iterations, potentially $5-$10 per complex task using Claude 3.5 Sonnet.
📝 Requires a detailed Requirements Document rather than casual chat-based prompting for best results.
🦀 Open-source tool written in Rust, developed by researchers at Goose and backed by Linux Foundation's AI Fund.