Setting Up A Repo In Under 5 Minutes As Software Engineers With Nix
Again: What should setting up a new repo look like?
It should be something like this:
- ‘Create this kind of project’
- Initialize the git repo
- Create the first commit
- Create the repo upstream
origin
- Then, push to
origin
, and setorigin
as upstream.
Okay. Let’s say I want to create a new static website project. This is my workflow: (prior to this post, hehe ^^)
> md new-website
> nft my#pollen-template
> gi
> gam "Initial commit"
> ghi new-website
> gpo
Can’t understand anything? Well, all of them are aliases/shell functions/abbreviations. This is what I typed:
> mkdir new-website && cd new-website
> nix flake init --template github:haglobah/flakes#pollen-template
> git init
> git add . && git commit --message "Initial commit"
> gh repo create new-website --private --source=. --remote=origin
> git push --set-upstream origin
And of course, it already brings its own devshell.
How do you set up a new project? And do you have any suggestions for a better workflow? Let me hear in the comments!