Dotfile : Do not fail if master does not exist.
This commit is contained in:
parent
6bc00fe38d
commit
67b1149593
|
@ -14,6 +14,7 @@
|
|||
${pkgs.git}/bin/git init
|
||||
${pkgs.git}/bin/git remote add origin https://git.voronind.com/voronind/linux.git
|
||||
${pkgs.git}/bin/git fetch || {
|
||||
echo "Dotfiles init failed, cleaning up.."
|
||||
rm -rf .git
|
||||
exit 1
|
||||
};
|
||||
|
@ -21,7 +22,7 @@
|
|||
${pkgs.git}/bin/git reset --hard HEAD
|
||||
${pkgs.git}/bin/git checkout main
|
||||
${pkgs.git}/bin/git branch --set-upstream-to=origin/main main
|
||||
${pkgs.git}/bin/git branch -D master
|
||||
${pkgs.git}/bin/git branch -D master || true
|
||||
${pkgs.git}/bin/git clean -f
|
||||
};
|
||||
${pkgs.git}/bin/git pull
|
||||
|
|
Reference in a new issue