Running Gogs (Go Git Service) as a service on macOS X server

This guides explains how you can run Gogs git server as a service on your Mac using launchd. Command line tools First you need to install Xcode from the Mac App Store. Once installed, you also need the Command Line Tools, you can initiate the download process by executing $ xcode-select –install in the Terminal. […]

Backup your databases in Git

Storing backups of the database is import for any possible service on the internet. Git can be the right tool to backup databases. Like other version control systems, Git tracks the changes, and will only push the changes in files to the remote. So if one line in a 1 million database dump is changed, we don’t […]

Git: ignore changes in tracked file

Sometimes you have changes on a tracked file, but you want to ignore that file (but keep it in the Git tree). Adding those files to a .gitignore file will not work, because Git will not ignore tracked files. However… You can ignore tracked files using the following command: git update-index –assume-unchanged <file> To stop […]

Git: author en email aanpassen in history

Het gebeurt al wel eens dat je in een commit de verkeerde author of email hebt staan. Als je zo een reeks commits hebt in een project, kan je met een shell script alle commits herschrijven. #!/bin/sh git filter-branch –env-filter ‘ an=”$GIT_AUTHOR_NAME” am=”$GIT_AUTHOR_EMAIL” cn=”$GIT_COMMITTER_NAME” cm=”$GIT_COMMITTER_EMAIL” if [ “$GIT_COMMITTER_EMAIL” = “old_mail@example.com” ] || [ “$GIT_COMMITTER_EMAIL” = […]