...stale branches pile up over time. It's best to remove them right after merge, locally and on the remote, but it is a little tedious: you need to remember...

Enter Git hooks. The folks at Liquid Light have built a little post-merge hook that will delete a feature branch on confirmation. Quick aside: Git hooks location

When trying to intersect conditions of two scopes, be careful with ActiveRecord::Relation#merge: it overwrites existing conditions on the same column. This may cause the relation to select more...

...authorized_users.merge(filtered_users).to_sql # => SELECT * FROM users WHERE id IN (2, 3) The merged relation select the users (2, 3), although we are only allowed to see...

Merge requests are often rejected for similar reasons. To avoid this, go through the following checklist before making a merge request. Human checks The change fulfills all acceptance criteria.

...same". Hazards are unnecessary and hard to resolve conflicts as well as incorrect auto-merges. In order to avoid this, always merge the production branch back to the main after...

git checkout production git cherry-pick AWESOME_COMMIT_SHA1 git checkout main git merge production To make your future life easier, choose a slightly more verbose merge commit message...

...re done with your feature and tests are green, and your changes pass our merge request checklist: Within your feature branch, merge the current main and push using:

...encouraged to use git pull --rebase if you know how it works. Open a merge request by clicking the link Gitlab prints on push. To open a merge request manually...

...error, fingerprint: [error.class.name]) raise(error) See the SDK Fingerprinting docs for more generic approaches. Merging errors manually Another approach is to tell Sentry to merge events with different fingerprints into...

...issue. To do this, simply select issues you want to group, and press the "Merge" button above the issue list. From then on, all errors with any of the merged...

--all: Search all known refs (branches, tags, remotes) --first-parent: Simplification for merges --reflog: Search all reflog entries Example: git log --all --first-parent --reflog -- path-to-file...

...Rails has a method ActiveRecord::Relation#merge that can merge ActiveRecord scopes. However, its behavior has never been clear, and in Rails 7 it still discards conditions on the same...

...column by the last condition. We discourage using #merge!) The best way to merge ActiveRecord scopes is using a subquery: scope_a.where(id: scope_b) It is a little less concise...

...Possibly a second list of things I want myself to remember ... 3.2 Create the merge request Within your feature branch, merge the current master and push using: git pull origin...

...encouraged to use git pull --rebase if you know how it works. Open a merge request by clicking the link Gitlab prints on push. To open a merge request manually...

GitLab has a RubyMine plugin that enables you to review and process merge requests within RubyMine! Setup Open RubyMine settings (Ctrl + Alt + S) > Plugins > Search for "GitLab" > Install

...In the RubyMine settings > Version Control > GitLab > Connect your GitLab account with "+" Working with merge requests From the Actions menu (Ctrl + Shift + A), choose "View merge requests" (with GitLab icon...

...finishes an issue, they will set it to "Review" on Linear and open a merge request on GitLab. You will receive an e-mail. Now review the code, either directly...

...do if the code is okay If the code is okay, you may either merge it into main yourself: Squash and merge into main Push Delete the branch with

...new features but the latest commits are not ready for production? Then use git merge master~n to skip the n-last commits. Tip A big advantage of merging vs...

...that cherry-picking will create copies of all picked commits. When you eventually do merge the branch after cherry-picking, you will have duplicate commit messages in your history.

...recommend using Reek primarily as a tool to help gauge the quality of a merge request or for feedback for your AI agent, not to block a PR from getting...

...merged. Code without any reek warning might not be better than code with warnings. Reek is a linter for detecting code smells and antipatterns in your Ruby codebase. It works...

So you didn't listen and here it comes: Ignore the Mail Merge Wizard. It will crash or destroy your document. Export your addresses, recipient names, etc. as...

...now insert placeholders for a column value. Use menu Insert => Field => More fields... => Mail Merge Fields. Select the address book database you imported earlier. Pick the column you want. Insert...

Switched to branch 'master' (master) $ This also works with other commands like git merge: (master) $ git checkout foobar Switched to branch 'foobar' (foobar) $ git merge - Merged branch 'master...

...is rewritten with every migration run, this can generate a lot of noise and merge conflicts in your repository. Possible reasons for this churn include: Two developers use different versions...

...feature branches, they will stack up if you don't delete them after the merge to master. Here's how to tidy them up. Delete feature branches Find already-merged...

...branches by running # On branch master git branch --merged You may safely delete each of the listed branches, because they point to commits that are contained in the history of...

...use this to build an alias that automatically pushes a branch and creates a merge request for it. Put this in your ~/.gitconfig in the [alias] section: mr = push origin...

...HEAD -o merge_request.create -o merge_request.draft Now you can do git mr and a draft merge request will be created. Target branch is your project's default branch, i.e. main or...

github.com

...version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" yarn-deduplicate will help you with that and merges the two entries above: "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658...

tl;dr: Do not use merge! for session hashes. Use update instead. Outline Let's assume you're modifying the Rails session. For simplicity, let's also assume your session...

# ... def update(hash) load_for_write! super end As you can see: While merge! is the same as update on a regular Hash (they are not aliased), update has...

docs.gitlab.com

...can use them in your .gitlab-ci.yml in your project. To limit test runs to merge requests and the master branch, you can write this: tests: script: bundle exec rake tests...

- if: '$CI_COMMIT_BRANCH == "master"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event...

makandracards.com

...git pull origin other-branch If you keep rebasing by default, you can get "merge pulls" like this: git pull --no-rebase origin other-branch

Merging .po-files with Git is painful. There have been attempts of making Git more clever when trying to merge .po-files. I believe however that this is not enough...

...in different branches at the same time. In order to not accidentally produce invalid merges I additionally disable merging for po files altogether, by adding the following .gitattributes file to...

makandracards.com

Resolve @{-1} to actual branch name. (Happens when merging...