geewax.org | Agile git Workflow
When we started using git to manage our source code at work, we actually jumped in a little bit too fast. It seems like there is a lot of writing about how you can do lots of really neat things with git, but no real guide about one particular way of using git for your project. This post is going to describe how we use git day to day on a reasonably large “agile-style” project.
Related cards:
gerrit - Project Hosting on Google Code
Gerrit is a web based code review system, facilitating online code reviews for projects using the Git version control system.
How to push to Git without running CI on GitLab CI, GitHub Actions, or Travis CI
If a project ist configured to spawn CI runners for tests or deployment when pushing to the Repo, a habit of pushing WIP commits regularly may conflict with that.
Here are two solutions that allow you to keep pushing whenever you feel like it.
#...
Configuring Git with .gitconfig
Basic configuration
Please keep this config simple. It should be a starting point for new developers learning Git.
[user]
name = Your Name
email = your.name@domain.com
[branch]
sort = -committerdate
[color]
ui = auto
[color "bra...
Migrate gem tests from Travis CI to Github Actions with gemika
We currently test most of our gems on Travis CI, but want to migrate those tests to Github Actions. This is a step-by-step guide on how to do this.
Note that this guide requires the gem to use gemika.
- Go...
Best practice: How to manage versions in a Gemfile
It most cases it's not necessary to add a version constraint next to your gems in the Gemfile
. Since all versions are saved in the Gemfile.lock
, everyone running bundle install
will get exactly the same versions.
There are some exceptions, ...
git: find the version of a gem that releases a certain commit
Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version the change was released. This might be the case for a bugfix PR that you want to add to your project.
Git can help you to find the next gi...
Git: In an (interactive) rebase, find out which commit you are currently working on (until version < 1.7.9.5)
When you are using git rebase
and are currently editing a commit (due to a conflict, for example), you may want to know the current commit. [1]\
Luckily, there is lots of useful stuff in the .git
directory.
Commit hash that you are curre...
GitHub Actions: Manually running a workflow
To start a workflow manually it must have a trigger called workflow_dispatch
:
---
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
branches:
- master
In th...
Github: How to find the Readme for a certain version of a gem
When a gem author releases a new version to Rubygems, usually a tag with the version number (e.g. v1.2.0
) is created an pushed to Github, so everyone can check out or take a look at the source code at this point version release at a later time.
...
Getting permanent links to files on Github or Gitlab
Please don't simply copy line number links from Github. The URL usually contains a branch name like master
which will change over time:
https://github.com/makandra/upjs/blob/master/lib/assets/javascripts/up/link.js.coffee#L76
If someon...