Checking a PR’s commits are all descendants of destination branch
In our team we have a requirement for our PRs: they need to be rebased before being merged, in order to achieve a “semi-linear history”. I’m looking for an automated way to evaluate this requirement (we know how to run a script as part of GitHub’s checks, but I need help with the git commands that make the evaluation itself). For now we only need to determine if a rebase is necessary.
How can you rebase a branch that is tracked remotely?
We’ve got a development branch, dev1. Starting from that, I create a feature branch, f1 and push to our git server:
What are the git commands to rebase a child-branch whose parent branch has been rebased?
NOTE: This is different from the question here Is there a way to rebase a child branch after the parent has been rebased? in that the child-branch is not “up to date” with the parent branch at the time the parent is rebased.
Should I use exec in git rebase to modify the repo?
Sometimes I want to make a change to several previous commits and I wonder if using the exec command in a rebase is a good solution. I think the only use of it I’ve seen is to compile or run tests to verify the rebase didn’t introduce broken code.
Problems when rebasing because of an untracked file
I want to rebase a branch into the main branch so I do
Old commit messages reappeared after rebase (reword)
I recently changed some commit messages in my git history.
Pull and rebase from master in same time
I want to optimize the following process:
What is the git issue that causes a bunch of commits already on master to be pushed to a pull request from a feature branch
I often see this in pull requests, where someone accidentally pushes up a bunch of rebased commits into their PR, and then in the commits tab, there’s a long list of all the existing commits that are already on master.