Чтобы изменить каталог с помощью скрипта bash, вы должны использовать обычный bash.
cd "C:/test/build"
echo "You're now in the folder, do what you will."
Сохраните файл как .sh, и его можно использовать как таковой. Обратите внимание, что при навигации по вашим папкам с использованием bash-скрипта помните, что каталог, с которого вы начинаете, всегда является домашним каталогом.
You can use interactive rebase and "squash" the commits -- see also the Git Ready Tutorial on squashing via rebase. Sorry to just dump a link on you but that's a pretty thorough tutorial. Oh, and this will also squash away your merges just fine.
"git merge --squash" (after "git fetch"; "git pull" is just fetch+merge, pehaps it also allows --squash option) might be what you want.
From git-merge(1):
--squash
Produce the working tree and index state as if a real merge happened, but do not actually make a commit or move the HEAD, nor record
$GIT_DIR/MERGE_HEAD
to cause the next git commit command to create a merge commit. This allows you to create a single commit on top of the current branch whose effect is the same as merging another branch (or more in case of an octopus).