<- back to solarcat
~* git guide *~
like github, but with better uptime!
/\_/\
( -.- ) git commit -m "meow"
> ^ <
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
step 1 :: get an account
-
go to
git.solarcat.eu,
click register, and pick a username + password. enter
your email — gitea sends a confirmation link (from
git@solarcat.eu; have a peek in
spam if it doesn't show up). click it and the account is
live.
-
prefer the personal touch? ask us and
we'll make you one by hand.
- log in and give yourself a nice display name.
step 2 :: install git
-
get it from
git-scm.com/downloads
(windows, mac and linux — on windows, next-next-finish is
fine).
-
check it works: open a terminal (on windows: "git bash") and
run git --version. it should answer
with something like git version 2.xx.
step 3 :: set up a login (pick one)
way A :: ssh key (recommended, one-time setup):
-
in the terminal, run
ssh-keygen -t ed25519 -C "you@whatever"
and just press enter all the way through.
-
it makes two files in ~/.ssh (on
windows: C:\Users\you\.ssh). the one
ending in .pub is your public
key — safe to share, that's the point.
-
open the .pub file and copy its whole
contents. (in git bash:
cat ~/.ssh/id_ed25519.pub)
-
in gitea: top right → settings →
ssh / gpg keys → add key → paste
→ save.
way B :: token (no terminal needed):
-
in gitea: settings → applications →
generate a new token (name it something like "my laptop",
give it all the permissions).
-
copy the token somewhere safe — it's shown only once.
-
whenever git asks for a password while pushing, the answer is
your username + this token.
step 4 :: make a repo and put things in it
-
in gitea, click the + → new repository.
name it, leave the defaults, create. (tick "private" if you
want it just for yourself!)
-
on the repo's page, gitea shows the exact commands to use —
including the right clone address. tip: ssh uses a funny
port (2222), but the address gitea shows already has it, so
just copy-paste from there and don't think about it.
or, doing it fully by hand from a fresh folder:
mkdir myproject && cd myproject
git init
echo "hello :3" > README.md
git add .
git commit -m "first commit"
git remote add origin ssh://git@git.solarcat.eu:2222/you/myproject.git
git push -u origin main
(replace you/myproject with your username and repo name.
if git complains it doesn't know which branch to push, run
git branch -M main and try the push
again.)
step 5 :: the daily loop
after the first push, 90% of git is just this, over and over:
# edit some files...
git add .
git commit -m "what you changed"
git push
-
git add . = "remember all the
changes", git commit = "save a
checkpoint", git push = "upload the
checkpoints to gitea".
-
every commit needs a little message — future-you will thank
present-you.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
repos, collaboration, merge conflicts, existential dread?
message us —
we'll sort you out <3