summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-07-21 16:06:38 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-07-21 16:06:38 +1000
commita47c889cbb385e93e895a257e12038a5827c45b8 (patch)
treeea05ee7849b9f6cfc9e699013b2a948ff3031566 /test
parentbcdfe242ac4050c4be22fc43791f3b98952b2f73 (diff)
parent61dcbb456d42fefc8aaac456e02c40bdef7de774 (diff)
merge with develop
Diffstat (limited to 'test')
-rwxr-xr-xtest/generate_basic_repo.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/generate_basic_repo.sh b/test/generate_basic_repo.sh
new file mode 100755
index 000000000..385ea8520
--- /dev/null
+++ b/test/generate_basic_repo.sh
@@ -0,0 +1,37 @@
+#!/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
+
+# call this command from the test directory:
+# ./generate_basic_repo.sh; cd testrepo; gg; cd ..
+
+# -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