.gitignore ignore all except

For certain configuration directories in my home dir, I sometimes want multiple files pushed to my dotfiles repo, but the majority of them not to be cared for (.env, .log, etc..) so I needed a way to use gitignore the opposite way: block everything and only allow some things: # Ignore everything * # But not these files... !.gitignore ! !template.latex # etc... # ...even if they are in subdirectories !

Continue reading ↦

Change an email address across multiple files in an svn directory

This one is quite easy, but a little tricky. Had to do this for work as one of our groups was changing their email address and a few of the repo’s they used had files that depended on that email. A couple requirements to keep in mind: Had to be recursive Had to excude certain file types Had to do the replacement in an svn repository, which apparantly is difficult.

Continue reading ↦

Changing your repos` remote origin

The server I usually use to store my repo is going to go offline soon. So I decided to just move it to bitbucket (love the free private repos:) $ git remote origin So obviously we only have our remote origin. git remote remove origin git remote add origin [email protected]:username/repo.git Then, lets push up our repo and all associated data with it (i.e. your commits) git push -u origin --all # pushes up the repo and its refs for the first time git push -u origin --tags # pushes up any tags And thats it!

Continue reading ↦