Skip to content

Instantly share code, notes, and snippets.

@benmanns
Created August 17, 2010 15:28
Show Gist options
  • Save benmanns/530406 to your computer and use it in GitHub Desktop.
Save benmanns/530406 to your computer and use it in GitHub Desktop.
#!/bin/sh
# NOTE: UGLY!
for i in {0..44} # I think I could have done this with filter-branch, but I'm not sure how to use it.
do
git rebase --continue
lines=$(cat OgreIsland/Sockets/Socket.cs | wc -l)
lines=$(expr $lines - 18)
echo adding to line $lines
awk 'NR==lines{print ""}1' lines="$lines" OgreIsland/Sockets/Socket.cs > OgreIsland/Sockets/test.cs
mv OgreIsland/Sockets/test.cs OgreIsland/Sockets/Socket.cs
git add OgreIsland/Sockets/Socket.cs
git commit --amend -F .git/rebase-merge/message
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment