git

Git change commit author

August 22, 2020
git

tags Programming Software Engineering The following scripts changes all repository commits from an specific author to a new author. This is specially handy if you mess up your git config at somepoint without knowing and start commiting with a random author or you change your email/name. #!/bin/sh git filter-branch --env-filter ' OLD_EMAIL="your-old-email@example.com" CORRECT_NAME="Your Correct Name" CORRECT_EMAIL="your-correct-email@example.com" if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] then export GIT_COMMITTER_NAME="$CORRECT_NAME" export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" fi if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] then export GIT_AUTHOR_NAME="$CORRECT_NAME" export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL" fi ' --tag-name-filter cat -- --branches --tags

Personal git workflow

August 4, 2020
git, workflow

tags Git Programming Workflow As of today, this is currently my git flow for most of my projects. Commit messages # From: https://chris.beams.io/posts/git-commit/ Feat: Any code that contains only a new feature, whether a new model field, a new API flag, etc Refactor: Any general code refactoring that does not contain anything new nor fixes anything. Chore: Anything related to the build configuration, dependency updates Docs: Anything related to documentation. ...

Attaching Jira issues to commit

May 24, 2020
blog
git, projects

TLDR ↕ Dynamically attach Jira attributes to commit body using git-hook. Check the project’s README. The place I work at requires Jira story ID and task ID attached to the commit body. Initially, I was attaching the ID to the commit body manually, by checking either my previous commit or opening up the Jira board, however, after working some hours I was easily forgetting to attach the IDs to the commit and getting annoying having to either reword them and perhaps having to lookup Jira again. ...

Finding exposed .git repositories

October 30, 2017
blog, web
git, security

Developers use git to version control their source code. We all do, in fact, this blog is currently versioned by git. However, we not only use git to version control, but also to deploy applications. Usually we push new code to a remote server, where the server takes care of testing the code and then deploying the application. There are different ways of deploying an application, but this is one of them. ...