repositories instead. Be aware that `xsatool` may have any of the following
effects on the tree:
-- Modify the working tree (including git clean -ffdx)
+- Modify the working tree (including `git clean -ffdx`)
-- Modify HEAD
+- Discard uncommited changes (e.g., `checkout -f`)
+
+- Modify `HEAD`
- Create, delete, or modify branches matching `xsa/*`
}
func (r Repo) MergeDefault(branch string) (out []byte, err error) {
- out, err = r.gitCmd("checkout", branch)
+ out, err = r.gitCmd("checkout", "-f", branch)
if err != nil {
return
return
}
}
- _, err = r.gitCmd("checkout", "-B", branch, ref)
+ _, err = r.gitCmd("checkout", "-f", "-B", branch, ref)
if err == nil {
_, err = r.gitCmd("clean", "-ffdx")
}
}
func (r Repo) Checkout(branch string) (out []byte, err error) {
- out, err = r.gitCmd("checkout", branch)
+ out, err = r.gitCmd("checkout", "-f", branch)
if err == nil {
_, err = r.gitCmd("clean", "-ffdx")
}