Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- git init
- # this is needed for me to make sure they conflict, being in fact texts
- # maybe for you it would be a good idea too
- echo 'bindir/** merge=binary' >.gitattributes
- seq 1 10 >noconflict
- seq 1 10 >conflict
- mkdir -p bindir/sub
- seq 1 10 >bindir/file
- seq 1 10 >bindir/sub/file
- git add .
- git commit -m init
- # branch changes
- sed -i noconflict -e s/3/m3/
- sed -i conflict -e s/5/m5/
- sed -i bindir/file -e s/3/m3/
- sed -i bindir/sub/file -e s/3/m3/
- git commit -a -m br
- git branch br
- git reset --hard HEAD~1
- # HEAD changes
- sed -i noconflict -e s/8/m8/
- sed -i conflict -e s/5/n5/
- sed -i bindir/file -e s/8/m8/
- sed -i bindir/sub/file -e s/8/m8/
- git commit -a -m master
- # here comes merge; "conflict", and "bindir" content conflict
- git merge br
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement