Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (28 sloc) 1.97 KB
Script to add github url:
git log --format=oneline --abbrev-commit master..HEAD | sed -e "s/^/http:\/\/github.com\/sruffell\/dahdi-linux\/commit\//g"
Stripping ANSI codes from text files:
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
[from
http://serverfault.com/questions/71285/in-centos-4-4-how-can-i-strip-escape-sequences-from-a-text-file]
Extracting the files from an RPM:
rpm2cpio myrpmfile.rpm | cpio -idmv
Replacing the git-svn-id from a branch and replacing it with Origin (from
tzafrir):
git filter-branch -f --msg-filter "sed -e 's|^git-svn-id: http://svn.asterisk.org/[^@]*@\([0-9]\+\) .*|Origin: http://svnview.digium.com/svn/dahdi?view=rev\&rev=\1|'"
Sending a patch series to the mailing list:
1. git checkout <branch which is ontop of master>
2. mkdir temp; cd temp
3. git format-patch --cover-letter <master>
4. edit the 0000-cover-letter.patch file to describe the changes
5. git send-email --suppress-cc=all --to=<mailing list> .
6. cd ..; rm -f -r temp
Adding acks onto a branch (from the git filter-branch man page):
1. git checkout for-trunk (the branch you had reviewed)
2. git checkout -b acked (temporary branch in case you mess things up)
3. git filter-branch -f --msg-filter 'cat && echo "Acked-by: (copy name/email from acked by line here)"' master..acked
4. (check the acked branch to make sure it looks good)
5. git checkout for-trunk; git reset --hard acked; git branch -d acked (Don't need to keep the acked branch around anymore)
Looking at the commits that are only on the master branch and not in the 2.4 release:
git log --oneline v2.4.0..master | sed -e 's/\w* //' > file.txt && git log --oneline v2.4.0..2.4 | sed -e 's/\w* //' >> file.txt && cat file.txt | sort | uniq -u | tee uniq.txt
Changing a configuration option in all the gitolite subdirs:
pushd .; for dir in `find repositories/ -name 'config' | sed -e "s/\/config$//"`; do cd /home/git/$dir; git config receive.denyNonFastForwards false; git config receive.denyDeleteCurrent ignore; done; popd
Jump to Line
Something went wrong with that request. Please try again.