mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-08 23:20:56 +00:00
Merge pull request #1384 from pi-hole/checkoutImprovements
Stash changes when switching branches
This commit is contained in:
commit
9beb9fd941
@ -54,6 +54,8 @@ fetch_checkout_pull_branch() {
|
|||||||
# Set the reference for the requested branch, fetch, check it put and pull it
|
# Set the reference for the requested branch, fetch, check it put and pull it
|
||||||
cd "${directory}"
|
cd "${directory}"
|
||||||
git remote set-branches origin "${branch}" || return 1
|
git remote set-branches origin "${branch}" || return 1
|
||||||
|
git stash --all --quiet &> /dev/null || true
|
||||||
|
git clean --force -d || true
|
||||||
git fetch --quiet || return 1
|
git fetch --quiet || return 1
|
||||||
checkout_pull_branch "${directory}" "${branch}" || return 1
|
checkout_pull_branch "${directory}" "${branch}" || return 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user