restore: Implemented with rebase and reset. (Do not forget to reset manually in case...
[gitgitconfig.git] / tests / remoteadd-save-clone-restore.sh
blob18fc34ca9615f2fa1209072e3bf40536eefd48d8
1 #!/bin/bash -ex
3 mkdir A
4 cd A
6 git init
7 echo a > a
8 git add a
9 git commit -m 'A.'
10 git remote add there git://example.com/a.git
11 gitgitconfig-save
13 cd ..
15 git clone -o first A B
16 cd B
18 gitgitconfig-restore first
20 if [[ "$(git remote)" == "$(echo there)" ]]; then
21 exit 0
22 else
23 exit 1