computing:git:new-repo-from-scratch
This is an old revision of the document!
Table of Contents
Create GIT Repo from Scratch
Create Forgejo Repo
Create the new repository that we want to populate and start using (e.g. “homesite”)
Upload source tree
Now we will prepare and upload the source tree to the repository. On the local computer enter the directory where the sources are and execute:
.gitignore
Create in the root of the source tree a .gitignore file and add all the files and folders that need to be excluded from the upload to the repositories.
Upload to local repo
git init git switch -c main git add . git commit -m "first commit"
Upload to remote repo
git remote add origin http://192.168.178.96:3000/git-admin/homesite.git git push -u origin main
- git init: will prepare local repository by creating the .git directory
- git switch: will create the main branch and switches the local repo to it.
- git add README.md
computing/git/new-repo-from-scratch.1787906252.txt.gz · Last modified: by oscar
