Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
75 views

How to replace duplicated multi-line groups, e.g. from git & diff3

I'm rebasing legacy code, and finding lots of conflicts caused by scripts -- usually code formatters. The changes are simple and predictable, so I can trivially re-run the script to apply the changes ...
Steve Almond's user avatar
1 vote
4 answers
8k views

sed replace characters in capture group

I've got this, which almost does what I want git show-branch --current $SHA1 \ | sed --quiet --regexp-extended \ 's/^.*\* \[[a-z]+\/(B-[0-9]+)-([a-z0-9-]+)\].*/\1 \2/p' \ | sed --quiet 2p and ...
xenoterracide's user avatar
0 votes
1 answer
310 views

Help with regex with sed -i for a tampermonkey script

I'm writing a tampermonkey script, using git and jsdelivr to store and send it to the users. For the jsdelivr to work correctly, i need to change the commit hash in the url. // @require https:/...
tunisiano187's user avatar
1 vote
0 answers
354 views

Emulating git status --ignored in non-repository folder

This might be in essence a duplicate of this question, however the perl script provided did not work in my case as far as I can tell. There are also many questions about finding multiple patterns, but ...
Jonathan H's user avatar
  • 2,493
3 votes
1 answer
342 views

Find repository names from gitolite info output

How do I extract the names from the gitolite info command output, for further piping into a script? I'm writing a migration script to migrate all my repositories from gitolite to a Gitlab server. ...
SpacyRicochet's user avatar
37 votes
1 answer
34k views

What is the .gitignore pattern equivalent of the regex (Big|Small)(State|City)-[0-9]*\.csv

I have a regex I stuck in my .gitignore similar to: (Big|Small)(State|City)-[0-9]*\.csv It didn't work so I tested it against RegexLab.NET. I then found the gitignore man page which led me to learn ...
Justin Dearing's user avatar