diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-07-21 15:57:54 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-07-21 15:57:54 +1000 |
commit | 37d9ed6712a529c5264ced2967c7aa504d893af9 (patch) | |
tree | c8a27c0c5b379b78c5907c49ed5f770afda74252 /test | |
parent | e059a87ae2c3bb4abce9c261db04971915520479 (diff) |
test script to make repo with a merge conflict
Diffstat (limited to 'test')
-rwxr-xr-x | test/generate_basic_repo.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/generate_basic_repo.sh b/test/generate_basic_repo.sh new file mode 100755 index 000000000..e7f567a23 --- /dev/null +++ b/test/generate_basic_repo.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# this script will make a repo with a master and develop branch, where we end up +# on the master branch and if we try and merge master we get a merge conflict + +# -e means exit if something fails +# -x means print out simple commands before running them +set -ex + +reponame="testrepo" + +rm -rf ${reponame} +mkdir ${reponame} +cd ${reponame} + +git init + +echo "Here is a story that has been told throuhg the ages" >> file1 +git add file1 +git commit -m "first commit" + +git checkout -b develop + +echo "once upon a time there was a dog" >> file1 +git add file1 +git commit -m "first commit on develop" + +git checkout master + +echo "once upon a time there was a cat" >> file1 +git add file1 +git commit -m "first commit on develop" + +git merge develop # should have a merge conflict here |