Skip to content

Commit

Permalink
home.git: fix initial-commit alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerschtli committed Mar 13, 2023
1 parent 3416109 commit 8278a92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 7 additions & 2 deletions home/programs/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ in
home.packages = [
pkgs.git-absorb
pkgs.tig
(
config.lib.custom.mkScript
"git-initial-commit"
./git-initial-commit.sh
[ pkgs.coreutils pkgs.git ]
{ }
)
];

programs.git = {
Expand Down Expand Up @@ -178,8 +185,6 @@ in
total-clean = externGitAlias "git co -f && git clean -dfx && git clean -dfX";

disable-upstream-push = "remote set-url upstream --push DISABLED";
initial-commit = externGitAlias "git init && ${pkgs.coreutils}/bin/touch .gitignore && git add .gitignore && \
git commit -m 'Initial commit'";
set-upstream = externGitAlias "git branch --set-upstream-to=origin/$(git branch-name) $(git branch-name)";
};

Expand Down
4 changes: 4 additions & 0 deletions home/programs/git/git-initial-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
git init
touch .gitignore
git add .gitignore
git commit -m 'Initial commit'

0 comments on commit 8278a92

Please sign in to comment.