Template
SHA256
1
0
Fork
You've already forked sha256
0
My personal sha256 template
2025年04月16日 00:55:54 -04:00
README.md updated readme 2025年04月16日 00:55:54 -04:00

#I found that I had to manually edit .git/config each time, even after specifying sha256 using the web GUI.
#Note that you still have to create the empty repo from the Web GUI, since forgejo doesn't allow PUSH_TO_CREATE by default
#Make sure to git clone (and also remote add) using git@, not https://

#What I added to .git/config:
repositoryformatversion = 1
[extensions]
objectformat = sha256

#Steps
#git: clone the sha256 template, if you're starting from the terminal. Skip to verify if you specified this template in the GUI.
git clone git@codeberg.org:oftenwrong/sha256.git your_repo_name

#update the existing repo
cd your_repo_name
git remote set-url origin git@codeberg.org:user/your_repo_name.git
git init
git init --object-format=sha256 -b main
git checkout -b main
#VERIFY: the correct url: git remote -v
git add README.md
git add .
git commit -m "your_message"
#make your repo now
git remote add origin git@codeberg.org:user/your_repo_name.git
git branch -M main
git push -uf origin main

UPDATE ALL SUBMODULES' DETATCHED HEADS FROM THE ROOT DIR OF YOUR REPO

git submodule foreach git checkout master